680681682683684685686687
this.button = aButton; } public void propertyChange(final PropertyChangeEvent event) { final ToggleStateAction theAction = (ToggleStateAction) event.getSource(); this.button.setSelected(theAction.isSelected()); }
243244245246247248249250251252253
getButton().registerKeyboardAction(newAction, k, JComponent.WHEN_IN_FOCUSED_WINDOW); } if (newAction instanceof ToggleStateAction) { final ToggleStateAction tsa = (ToggleStateAction) action; setSelected(tsa.isSelected()); } } }
311312313314315316317318319320
final KeyStroke k = (KeyStroke) o; setAcceltext(k.toString()); } if (newAction instanceof ToggleStateAction) { final ToggleStateAction tsa = (ToggleStateAction) newAction; setSelected(tsa.isSelected()); } } }
9899100101102103104105106107
oldAction.removePropertyChangeListener(updateHandler); } super.setAction(a); if (a instanceof ToggleStateAction) { final ToggleStateAction a2 = (ToggleStateAction) a; a.addPropertyChangeListener(updateHandler); setSelected(a2.isSelected()); } }
484950515253545556
} final Action action = getAction(); if (action instanceof ToggleStateAction) { final ToggleStateAction taction = (ToggleStateAction) action; setSelected(taction.isSelected()); } }
244245246247248249250251252253254
631632633634635636637638