PropertyModel getModel() { if (model == null) { return new NodePropertyModel(getProperty(), null); } else { return model; } }
public void reset() { try { originalValue = getProperty().getValue(); getPropertyEditor().setValue(originalValue); } catch (Exception e) { //should not happen - the value came from the property Logger.getLogger(CustomEditorDisplayer.class.getName()).log(Level.WARNING, null, e); } }
if ((entered != null) && entered.equals(getProperty().getValue())) { if (getProperty().canRead()) { editor.setValue(model.getValue()); PropUtils.findLocalizedMessage(exception, entered, getProperty().getDisplayName())); throw iae;
if (entered != null && entered.equals(getProperty().getValue())) { if (getProperty().canRead()) { editor.setValue(model.getValue()); iae, ErrorManager.USER, null, PropUtils.findLocalizedMessage(exception, entered, getProperty().getDisplayName()), exception, null); throw iae;
public void reset() { try { originalValue = getProperty().getValue(); getPropertyEditor().setValue(originalValue); } catch (Exception e) { //should not happen - the value came from the property ErrorManager.getDefault().notify(ErrorManager.WARNING, e); } }
PropertyModel getModel() { if (model == null) { return new NodePropertyModel(getProperty(), null); } else { return model; } }
if (entered != null && entered.equals(getProperty().getValue())) { if (getProperty().canRead()) { editor.setValue(model.getValue()); iae, ErrorManager.USER, null, PropUtils.findLocalizedMessage(exception, entered, getProperty().getDisplayName()), exception, null); throw iae;
public void reset() { try { originalValue = getProperty().getValue(); getPropertyEditor().setValue(originalValue); } catch (Exception e) { //should not happen - the value came from the property ErrorManager.getDefault().notify(ErrorManager.WARNING, e); } }
PropertyModel getModel() { if (model == null) { return new NodePropertyModel(getProperty(), null); } else { return model; } }
public String isModifiedValueLegal() { boolean legal = true; String msg = null; PropertyEditor editor = getPropertyEditor(); // System.err.println("IS MODIFIED VALUE LEGAL"); if (env != null) { legal = env.getState() != env.STATE_INVALID; System.err.println(" Attempting to validate env"); if (legal && env.STATE_NEEDS_VALIDATION.equals(env.getState())) { msg = env.silentlySetState(env.STATE_VALID, getEnteredValue()); // System.err.println(" silentlySetState returned: " + msg); legal = msg == null; } } else if (editor instanceof EnhancedCustomPropertyEditor) { Object entered = ((EnhancedCustomPropertyEditor) editor).getPropertyValue(); try { editor.setValue(entered); } catch (IllegalStateException ise) { legal = false; msg = PropUtils.findLocalizedMessage(ise, entered, getProperty().getDisplayName()); } } if (!legal && (msg == null)) { // System.err.println(" not legal, constructing message"); msg = NbBundle.getMessage( CustomEditorDisplayer.class, "FMT_CannotUpdateProperty",editor.getValue(), getProperty().getDisplayName()); //NOI18N } return msg; }
PropertyEditor getPropertyEditor() { //Package private for unit tests if (editor == null) { setPropertyEditor(PropUtils.getPropertyEditor(getProperty())); } return editor; }
legal = false; msg = PropUtils.findLocalizedMessage(ise, entered, getProperty().getDisplayName()); CustomEditorDisplayer.class, "FMT_CannotUpdateProperty"), new Object[] { editor.getValue(), getProperty().getDisplayName()}); //NOI18N
PropertyEditor getPropertyEditor() { //Package private for unit tests if (editor == null) { setPropertyEditor(PropUtils.getPropertyEditor(getProperty())); } return editor; }
legal = false; msg = PropUtils.findLocalizedMessage(ise, entered, getProperty().getDisplayName()); CustomEditorDisplayer.class, "FMT_CannotUpdateProperty"), new Object[] { editor.getValue(), getProperty().getDisplayName()}); //NOI18N
PropertyEditor getPropertyEditor() { //Package private for unit tests if (editor == null) { setPropertyEditor(PropUtils.getPropertyEditor(getProperty())); } return editor; }
if (!editor.supportsCustomEditor()) { throw new IllegalArgumentException ("Property editor " + editor + " for property " + getProperty() + " does not support a custom editor."); //NOI18N
if (!editor.supportsCustomEditor()) { throw new IllegalArgumentException ("Property editor " + editor + " for property " + getProperty() + " does not support a custom editor."); //NOI18N