/** Clears the listener. */ private void clearListener() { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if (l != null) { l.clear(); putProperty(LISTENER, null); } } }
putProperty(PROP_ACTION_PERFORMER, performer); updateEnabled();
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled() { Action action = GlobalManager.getDefault().findGlobalAction( getActionMapKey(), getSurviveFocusChange() ); if (action != null) { setEnabled(action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if ((l == null) || (l.get() != this)) { l = new ActionDelegateListener(this, action); putProperty(LISTENER, l); } else { l.attach(action); } } } else { if (getActionPerformer() != null) { // we have performer setEnabled(true); } else { setEnabled(false); } clearListener(); } }
/** Clears the listener. */ private void clearListener() { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if (l != null) { l.clear(); putProperty(LISTENER, null); } } }
putProperty(PROP_ACTION_PERFORMER, performer); updateEnabled();
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled() { Action action = GlobalManager.getDefault().findGlobalAction( getActionMapKey(), getSurviveFocusChange() ); if (action != null) { setEnabled(action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if ((l == null) || (l.get() != this)) { l = new ActionDelegateListener(this, action); putProperty(LISTENER, l); } else { l.attach(action); } } } else { if (getActionPerformer() != null) { // we have performer setEnabled(true); } else { setEnabled(false); } clearListener(); } }
/** Clears the listener. */ private void clearListener () { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener)getProperty(LISTENER); if (l != null) { l.clear (); putProperty (LISTENER, null); } } }
/** Clears the listener. */ private void clearListener () { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener)getProperty(LISTENER); if (l != null) { l.clear (); putProperty (LISTENER, null); } } }
/** Clears the listener. */ private void clearListener() { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if (l != null) { l.clear(); putProperty(LISTENER, null); } } }
/** Clears the listener. */ private void clearListener() { synchronized (LISTENER) { // remove listener on any action ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if (l != null) { l.clear(); putProperty(LISTENER, null); } } }
putProperty(PROP_ACTION_PERFORMER, performer); updateEnabled();
putProperty ( PROP_ACTION_PERFORMER, performer );
putProperty(PROP_ACTION_PERFORMER, performer); updateEnabled();
putProperty ( PROP_ACTION_PERFORMER, performer );
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled () { javax.swing.Action action = findGlobalContextAction (); if(action != null) { setEnabled (action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener)getProperty(LISTENER); if (l == null) { l = new ActionDelegateListener (this, action); putProperty (LISTENER, l); } else { l.attach (action); } } } else { if (getActionPerformer () != null) { // we have performer setEnabled (true); } else { setEnabled (false); } clearListener (); } }
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled () { javax.swing.Action action = findGlobalContextAction (); if(action != null) { setEnabled (action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener)getProperty(LISTENER); if (l == null) { l = new ActionDelegateListener (this, action); putProperty (LISTENER, l); } else { l.attach (action); } } } else { if (getActionPerformer () != null) { // we have performer setEnabled (true); } else { setEnabled (false); } clearListener (); } }
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled() { Action action = GlobalManager.getDefault().findGlobalAction( getActionMapKey(), getSurviveFocusChange() ); if (action != null) { setEnabled(action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if ((l == null) || (l.get() != this)) { l = new ActionDelegateListener(this, action); putProperty(LISTENER, l); } else { l.attach(action); } } } else { if (getActionPerformer() != null) { // we have performer setEnabled(true); } else { setEnabled(false); } clearListener(); } }
/** Updates the enabled state by checking performer and ActionMap */ private void updateEnabled() { Action action = GlobalManager.getDefault().findGlobalAction( getActionMapKey(), getSurviveFocusChange() ); if (action != null) { setEnabled(action.isEnabled()); synchronized (LISTENER) { ActionDelegateListener l = (ActionDelegateListener) getProperty(LISTENER); if ((l == null) || (l.get() != this)) { l = new ActionDelegateListener(this, action); putProperty(LISTENER, l); } else { l.attach(action); } } } else { if (getActionPerformer() != null) { // we have performer setEnabled(true); } else { setEnabled(false); } clearListener(); } }