/** * Callback for toggle actions. This event will be redispatched to * the target manager along with value of the the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ public void itemStateChanged(ItemEvent evt) { // Update all objects that share this item boolean newValue; boolean oldValue = isSelected(); newValue = evt.getStateChange() == ItemEvent.SELECTED; if (oldValue != newValue) { setSelected(newValue); getTargetManager().doCommand(getActionCommand(), evt); } }
/** * Callback for toggle actions. This event will be redispatched to * the target manager along with value of the the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void itemStateChanged(ItemEvent evt) { // Update all objects that share this item boolean newValue; boolean oldValue = isSelected(); newValue = evt.getStateChange() == ItemEvent.SELECTED; if (oldValue != newValue) { setSelected(newValue); getTargetManager().doCommand(getActionCommand(), evt); } }
/** * Callback for toggle actions. This event will be redispatched to * the target manager along with value of the the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void itemStateChanged(ItemEvent evt) { // Update all objects that share this item boolean newValue; boolean oldValue = isSelected(); newValue = evt.getStateChange() == ItemEvent.SELECTED; if (oldValue != newValue) { setSelected(newValue); getTargetManager().doCommand(getActionCommand(), evt); } }
/** * Callback for toggle actions. This event will be redispatched to * the target manager along with value of the the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void itemStateChanged(ItemEvent evt) { // Update all objects that share this item boolean newValue; boolean oldValue = isSelected(); newValue = evt.getStateChange() == ItemEvent.SELECTED; if (oldValue != newValue) { setSelected(newValue); getTargetManager().doCommand(getActionCommand(), evt); } }