void SaveConfig() { String id = Long.toString(robot_uid); prefs.put(id + "_limit_top", Double.toString(limit_top)); prefs.put(id + "_limit_bottom", Double.toString(limit_bottom)); prefs.put(id + "_limit_right", Double.toString(limit_right)); prefs.put(id + "_limit_left", Double.toString(limit_left)); prefs.put(id + "_m1invert", Boolean.toString(m1invert)); prefs.put(id + "_m2invert", Boolean.toString(m2invert)); }
@Override public Object getValue() { JTextField text = getComboText(); if (text == null) { return myBooleanResourceValue == null ? Boolean.toString(myCheckBox.isSelected()) : myBooleanResourceValue; } String value = text.getText(); if (value == StringsComboEditor.UNSET || StringUtil.isEmpty(value)) { return null; } if (myIsDimension && !value.startsWith("@") && !value.endsWith("dip") && !value.equalsIgnoreCase("wrap_content") && !value.equalsIgnoreCase("fill_parent") && !value.equalsIgnoreCase("match_parent")) { if (value.length() <= 2) { return value + "dp"; } int index = value.length() - 2; String dimension = value.substring(index); if (ArrayUtil.indexOf(ResourceRenderer.DIMENSIONS, dimension) == -1) { return value + "dp"; } } return value; }
@Override public void dispose() { PropertiesComponent instance = PropertiesComponent.getInstance(); instance.setValue(PROP_SORTED, Boolean.toString(isAlphabeticallySorted())); instance.setValue(PROP_SHOWCLASSES, Boolean.toString(myShowClasses)); if (myCopyJavadocCheckbox != null) { instance.setValue(PROP_COPYJAVADOC, Boolean.toString(myCopyJavadocCheckbox.isSelected())); } final Container contentPane = getContentPane(); if (contentPane != null) { contentPane.removeAll(); } mySelectedNodes.clear(); myElements = null; super.dispose(); }