/** * 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 command actions. This event will be redispatched to * the target manager along with the value of the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ public void actionPerformed(ActionEvent evt) { if (!isStateAction()) { // Do not process this event if it's a toggle action. getTargetManager().doCommand(getActionCommand(), evt); } }
public static TargetableAction createTargetableAction(String id, String name, String mnemonic, boolean toggle, String group) { return (TargetableAction)configureAction(new TargetableAction(name, id), mnemonic, toggle, group); }
public static TargetableAction createTargetableAction(String id, String name, String mnemonic, boolean toggle, String group) { return (TargetableAction)configureAction(new TargetableAction(name, id), mnemonic, toggle, group); }
/** * 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 command actions. This event will be redispatched to * the target manager along with the value of the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void actionPerformed(ActionEvent evt) { if (!isStateAction()) { // Do not process this event if it's a toggle action. getTargetManager().doCommand(getActionCommand(), evt); } }
public static TargetableAction createTargetableAction(String id, String name, String mnemonic, boolean toggle, String group) { return (TargetableAction)configureAction(new TargetableAction(name, id), mnemonic, toggle, group); }
/** * 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 command actions. This event will be redispatched to * the target manager along with the value of the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void actionPerformed(ActionEvent evt) { if (!isStateAction()) { // Do not process this event if it's a toggle action. getTargetManager().doCommand(getActionCommand(), evt); } }
public static TargetableAction createTargetableAction(String id, String name, String mnemonic, boolean toggle, String group) { return (TargetableAction)configureAction(new TargetableAction(name, id), mnemonic, toggle, group); }
/** * 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 command actions. This event will be redispatched to * the target manager along with the value of the Action.ACTION_COMMAND_KEY * * @param evt event which will be forwarded to the TargetManager * @see TargetManager */ @Override public void actionPerformed(ActionEvent evt) { if (!isStateAction()) { // Do not process this event if it's a toggle action. getTargetManager().doCommand(getActionCommand(), evt); } }