/** * Return the singleton instance. */ public static TargetManager getInstance() { if (INSTANCE == null) { INSTANCE = new TargetManager(); } return INSTANCE; }
/** * Appends the target to the target list. * @param target the targeted object to add */ public void addTarget(Targetable target) { addTarget(target, false); }
/** * Returns the target manager instance which will be used for action * dispatch. If the target manager has not previously been set then the * singleton instance will be returned. * * @return a non null target manager */ public TargetManager getTargetManager() { if (targetManager == null) { targetManager = TargetManager.getInstance(); } return targetManager; }
/** * 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); } }
/** * 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); } }
/** * 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); } }
/** * Appends the target to the target list. * @param target the targeted object to add */ public void addTarget(Targetable target) { addTarget(target, false); }
/** * Return the singleton instance. */ public static TargetManager getInstance() { if (INSTANCE == null) { INSTANCE = new TargetManager(); } return INSTANCE; }
/** * Returns the target manager instance which will be used for action * dispatch. If the target manager has not previously been set then the * singleton instance will be returned. * * @return a non null target manager */ public TargetManager getTargetManager() { if (targetManager == null) { targetManager = TargetManager.getInstance(); } return targetManager; }
/** * 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); } }
/** * Appends the target to the target list. * @param target the targeted object to add */ public void addTarget(Targetable target) { addTarget(target, false); }
/** * Return the singleton instance. */ public static TargetManager getInstance() { if (INSTANCE == null) { INSTANCE = new TargetManager(); } return INSTANCE; }
/** * Returns the target manager instance which will be used for action * dispatch. If the target manager has not previously been set then the * singleton instance will be returned. * * @return a non null target manager */ public TargetManager getTargetManager() { if (targetManager == null) { targetManager = TargetManager.getInstance(); } return targetManager; }
/** * 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); } }
/** * Appends the target to the target list. * @param target the targeted object to add */ public void addTarget(Targetable target) { addTarget(target, false); }
/** * Return the singleton instance. */ public static TargetManager getInstance() { if (INSTANCE == null) { INSTANCE = new TargetManager(); } return INSTANCE; }
/** * Returns the target manager instance which will be used for action * dispatch. If the target manager has not previously been set then the * singleton instance will be returned. * * @return a non null target manager */ public TargetManager getTargetManager() { if (targetManager == null) { targetManager = TargetManager.getInstance(); } return targetManager; }
/** * 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 */ 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); } }