public void setValue(Object o) { value = o; setText((value instanceof String) ? (String) value : ((value != null) ? value.toString() : null)); }
public void setValue(Object o) { value = o; setText (value instanceof String ? (String) value : value != null ? value.toString() : null); }
public void setValue(Object o) { value = o; setText (value instanceof String ? (String) value : value != null ? value.toString() : null); }
public void reset() { setText (editor.getAsText()); Image i=null; if (env != null) { if (env.getState() == env.STATE_INVALID) { setForeground(PropUtils.getErrorColor()); i = Utilities.loadImage ( "org/openide/resources/propertysheet/invalid.gif"); //NOI18N } else { Object o = env.getFeatureDescriptor().getValue("valueIcon"); //NOI18N if (o instanceof Icon) { setIcon((Icon) o); } else if (o instanceof Image) { i = (Image) o; } } } if (i != null) { setIcon (new ImageIcon(i)); } }
@Override public void reset() { setText(editor.getAsText()); Image i = null; FeatureDescriptor fd; if (env != null) { if (env.getState() == PropertyEnv.STATE_INVALID) { setForeground(PropUtils.getErrorColor()); i = ImageUtilities.loadImage("org/openide/resources/propertysheet/invalid.gif"); //NOI18N } else { fd = env.getFeatureDescriptor(); Object o = fd == null ? null : fd.getValue("valueIcon"); //NOI18N if (o instanceof Icon) { setIcon((Icon) o); } else if (o instanceof Image) { i = (Image) o; } } } if (i != null) { setIcon(new ImageIcon(i)); } }
public void reset() { setText (editor.getAsText()); Image i=null; if (env != null) { if (env.getState() == env.STATE_INVALID) { setForeground(PropUtils.getErrorColor()); i = Utilities.loadImage ( "org/openide/resources/propertysheet/invalid.gif"); //NOI18N } else { Object o = env.getFeatureDescriptor().getValue("valueIcon"); //NOI18N if (o instanceof Icon) { setIcon((Icon) o); } else if (o instanceof Image) { i = (Image) o; } } } if (i != null) { setIcon (new ImageIcon(i)); } }