/** 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(); } }
/** 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(); } }