public void actionPerformed(ActionEvent e) { // System.err.println("\n\nGot action from inplace editor for " + getProperty().getDisplayName() + " - " + e.getActionCommand()); //See if it was enter or escape boolean isSuccess = InplaceEditor.COMMAND_SUCCESS.equals(e.getActionCommand()) || "comboBoxEdited".equals(e.getActionCommand()); //NOI18N //if the value should get updated, do something if (isSuccess) { if ((getUpdatePolicy() == UPDATE_ON_CONFIRMATION) || (getUpdatePolicy() == UPDATE_ON_FOCUS_LOST)) { //XXX needed by property panel, but breaks API def. Fine while this is not API. commit(); } //JTextField style behavior - fire a change unless there are //action listeners attached if (hasActionListeners()) { fireActionPerformed(); } else { //Try to close the dialog, if any on enter - this method //will make sure we're really processing an enter-key event trySendEnterToDialog(); } } else if (!hasActionListeners()) { //Try to close the dialog, if any, and if we're really processing //an escape key event trySendEscToDialog(); } }
if (getUpdatePolicy() == UPDATE_ON_CONFIRMATION || getUpdatePolicy() == UPDATE_ON_FOCUS_LOST) { //XXX needed by property panel, but breaks API def. Fine while this is not API. commit();
if (getUpdatePolicy() == UPDATE_ON_CONFIRMATION || getUpdatePolicy() == UPDATE_ON_FOCUS_LOST) { //XXX needed by property panel, but breaks API def. Fine while this is not API. commit();
public boolean commit() throws IllegalArgumentException { boolean result; try { result =_commit(); } catch (IllegalArgumentException iae) { result = false; if (getUpdatePolicy() != UPDATE_ON_EXPLICIT_REQUEST) { PropertyDialogManager.notify(iae); } else { throw iae; } } return result; }
public boolean commit() throws IllegalArgumentException { boolean result; try { result = _commit(); } catch (IllegalArgumentException iae) { result = false; if (getUpdatePolicy() != UPDATE_ON_EXPLICIT_REQUEST) { PropertyDialogManager.notify(iae); } else { throw iae; } } return result; }
public boolean commit() throws IllegalArgumentException { boolean result; try { result =_commit(); } catch (IllegalArgumentException iae) { result = false; if (getUpdatePolicy() != UPDATE_ON_EXPLICIT_REQUEST) { PropertyDialogManager.notify(iae); } else { throw iae; } } return result; }
public void focusLost(java.awt.event.FocusEvent e) { //don't let spurious focus changes while replacing the inner component //trigger additional work if (shouldIgnoreFocusEvents()) { return; } if ( !e.isTemporary() && (getUpdatePolicy() == UPDATE_ON_FOCUS_LOST) && !getInplaceEditor().isKnownComponent(e.getOppositeComponent()) && isValueModified() ) { commit(); } } }
public void focusLost(java.awt.event.FocusEvent e) { //don't let spurious focus changes while replacing the inner component //trigger additional work if (shouldIgnoreFocusEvents()) { return; } if( !e.isTemporary() && getUpdatePolicy() == UPDATE_ON_FOCUS_LOST && !getInplaceEditor().isKnownComponent(e.getOppositeComponent()) && isValueModified() ) { commit(); } } }
public void focusLost(java.awt.event.FocusEvent e) { //don't let spurious focus changes while replacing the inner component //trigger additional work if (shouldIgnoreFocusEvents()) { return; } if( !e.isTemporary() && getUpdatePolicy() == UPDATE_ON_FOCUS_LOST && !getInplaceEditor().isKnownComponent(e.getOppositeComponent()) && isValueModified() ) { commit(); } } }
protected void setPropertyEnv(PropertyEnv env) { if (getPropertyEnv() != null) { detachFromEnv(getPropertyEnv()); } super.setPropertyEnv(env); if (env != null) { env.setChangeImmediate(getUpdatePolicy() != UPDATE_ON_EXPLICIT_REQUEST); attachToEnv(getPropertyEnv()); } }
protected void setPropertyEnv(PropertyEnv env) { if (getPropertyEnv() != null) { detachFromEnv(getPropertyEnv()); } super.setPropertyEnv(env); if (env != null) { env.setChangeImmediate(getUpdatePolicy()!=UPDATE_ON_EXPLICIT_REQUEST); attachToEnv(getPropertyEnv()); } }
protected void setPropertyEnv(PropertyEnv env) { if (getPropertyEnv() != null) { detachFromEnv(getPropertyEnv()); } super.setPropertyEnv(env); if (env != null) { env.setChangeImmediate(getUpdatePolicy()!=UPDATE_ON_EXPLICIT_REQUEST); attachToEnv(getPropertyEnv()); } }