@Override public void run() { if (!originalPath.equals(pathField.getText()) || originalSize != ((Integer) sizeSpinner.getValue())) { ConcurrentHashMap map = new ConcurrentHashMap(); map.put(fontPathKey, pathField.getText()); map.put(fontSizeKey, sizeSpinner.getValue()); Config.put(map); } }
@Override public void run() { int rgb = -1; try { rgb = Integer.decode(colorField.getText()); } catch (NumberFormatException nfe) { } if ((originalPath != null && !originalPath.equals(colorField.getText())) || (originalColor != null && (originalColor.getRGB() & 0xFFFFFF) != rgb)) { Config.put(backgroundKey, colorField.getText()); } }
@Override public void run() { if (isChanged) { Config.put(keyName, getValue()); } }