protected boolean isToggling(Action action, AbstractButton button) { if (!(action instanceof AbstractAction)) return false; PropertyChangeListener[] listeners = ((AbstractAction)action).getPropertyChangeListeners(); for (int i = listeners.length - 1; i >= 0; i--) { if (listeners[i] instanceof ToggleActionPropertyChangeListener) { if (((ToggleActionPropertyChangeListener) listeners[i]).isToggling(button)) return true; } } return false; }
protected synchronized boolean shouldAddListener(Action action, AbstractButton button) { releasePCLs(action); // PENDING JW: revisit - we need a configurator to maintain at most a 1:1 from button to // action anyway: so a true in isToggling must not happen. // return !isToggling(action, button); // return true; }
protected synchronized boolean shouldAddListener(Action action, AbstractButton button) { releasePCLs(action); // PENDING JW: revisit - we need a configurator to maintain at most a 1:1 from button to // action anyway: so a true in isToggling must not happen. // return !isToggling(action, button); // return true; }
protected synchronized boolean shouldAddListener(Action action, AbstractButton button) { releasePCLs(action); // PENDING JW: revisit - we need a configurator to maintain at most a 1:1 from button to // action anyway: so a true in isToggling must not happen. // return !isToggling(action, button); // return true; }
protected boolean isToggling(Action action, AbstractButton button) { if (!(action instanceof AbstractAction)) return false; PropertyChangeListener[] listeners = ((AbstractAction)action).getPropertyChangeListeners(); for (int i = listeners.length - 1; i >= 0; i--) { if (listeners[i] instanceof ToggleActionPropertyChangeListener) { if (((ToggleActionPropertyChangeListener) listeners[i]).isToggling(button)) return true; } } return false; }
protected boolean isToggling(Action action, AbstractButton button) { if (!(action instanceof AbstractAction)) return false; PropertyChangeListener[] listeners = ((AbstractAction)action).getPropertyChangeListeners(); for (int i = listeners.length - 1; i >= 0; i--) { if (listeners[i] instanceof ToggleActionPropertyChangeListener) { if (((ToggleActionPropertyChangeListener) listeners[i]).isToggling(button)) return true; } } return false; }
protected synchronized boolean shouldAddListener(Action action, AbstractButton button) { releasePCLs(action); // PENDING JW: revisit - we need a configurator to maintain at most a 1:1 from button to // action anyway: so a true in isToggling must not happen. // return !isToggling(action, button); // return true; }
protected boolean isToggling(Action action, AbstractButton button) { if (!(action instanceof AbstractAction)) return false; PropertyChangeListener[] listeners = ((AbstractAction)action).getPropertyChangeListeners(); for (int i = listeners.length - 1; i >= 0; i--) { if (listeners[i] instanceof ToggleActionPropertyChangeListener) { if (((ToggleActionPropertyChangeListener) listeners[i]).isToggling(button)) return true; } } return false; }
if (l[i] instanceof ToggleActionPropertyChangeListener) { ToggleActionPropertyChangeListener togglePCL = (ToggleActionPropertyChangeListener) l[i]; if (togglePCL.isToggling(button)) { actionExt.removePropertyChangeListener(togglePCL);
if (l[i] instanceof ToggleActionPropertyChangeListener) { ToggleActionPropertyChangeListener togglePCL = (ToggleActionPropertyChangeListener) l[i]; if (togglePCL.isToggling(button)) { actionExt.removePropertyChangeListener(togglePCL);
if (l[i] instanceof ToggleActionPropertyChangeListener) { ToggleActionPropertyChangeListener togglePCL = (ToggleActionPropertyChangeListener) l[i]; if (togglePCL.isToggling(button)) { actionExt.removePropertyChangeListener(togglePCL);
if (l[i] instanceof ToggleActionPropertyChangeListener) { ToggleActionPropertyChangeListener togglePCL = (ToggleActionPropertyChangeListener) l[i]; if (togglePCL.isToggling(button)) { actionExt.removePropertyChangeListener(togglePCL);