public static BoundAction createBoundAction(String id, String name, String mnemonic, boolean toggle, String group) { return (BoundAction)configureAction(new BoundAction(name, id), mnemonic, toggle, group); }
public static CompositeAction createCompositeAction(String id, String name, String mnemonic, boolean toggle, String group) { return (CompositeAction)configureAction(new CompositeAction(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 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); } }
/** * Sets the selected state of a toggle action. If the id doesn't * correspond to a toggle action then it will fail silently. * * @param id the value of the action id * @param selected true if the action is to be selected; otherwise false. */ public void setSelected(Object id, boolean selected) { AbstractActionExt action = getStateChangeAction(id); if (action != null) { action.setSelected(selected); } }
/** * Convenience method to register a callback method on a <code>BoundAction</code> * * @see BoundAction#registerCallback * @param id value of the action id - which is the value of the ACTION_COMMAND_KEY * @param handler the object which will be perform the action * @param method the name of the method on the handler which will be called. */ public void registerCallback(Object id, Object handler, String method) { BoundAction action = getBoundAction(id); if (action != null) { action.registerCallback(handler, method); } }
/** * Determines if the Action corresponding to the action id is a state changed * action (toggle, group type action). * * @param id value of the action id * @return true if the action id represents a multi state action; false otherwise */ public boolean isStateAction(Object id) { Action action = getAction(id); if (action != null && action instanceof AbstractActionExt) { return ((AbstractActionExt)action).isStateAction(); } return false; }
/** * 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 BoundAction createBoundAction(String id, String name, String mnemonic, boolean toggle, String group) { return (BoundAction)configureAction(new BoundAction(name, id), mnemonic, toggle, group); }
/** * Sets the selected state of a toggle action. If the id doesn't * correspond to a toggle action then it will fail silently. * * @param id the value of the action id * @param selected true if the action is to be selected; otherwise false. */ public void setSelected(Object id, boolean selected) { AbstractActionExt action = getStateChangeAction(id); if (action != null) { action.setSelected(selected); } }
public static CompositeAction createCompositeAction(String id, String name, String mnemonic, boolean toggle, String group) { return (CompositeAction)configureAction(new CompositeAction(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); }
/** * Determines if the Action corresponding to the action id is a state changed * action (toggle, group type action). * * @param id value of the action id * @return true if the action id represents a multi state action; false otherwise */ public boolean isStateAction(Object id) { Action action = getAction(id); if (action != null && action instanceof AbstractActionExt) { return ((AbstractActionExt)action).isStateAction(); } return false; }
public static BoundAction createBoundAction(String id, String name, String mnemonic, boolean toggle, String group) { return (BoundAction)configureAction(new BoundAction(name, id), mnemonic, toggle, group); }
/** * Sets the selected state of a toggle action. If the id doesn't * correspond to a toggle action then it will fail silently. * * @param id the value of the action id * @param selected true if the action is to be selected; otherwise false. */ public void setSelected(Object id, boolean selected) { AbstractActionExt action = getStateChangeAction(id); if (action != null) { action.setSelected(selected); } }
public static CompositeAction createCompositeAction(String id, String name, String mnemonic, boolean toggle, String group) { return (CompositeAction)configureAction(new CompositeAction(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); }
public static BoundAction createBoundAction(String id, String name, String mnemonic, boolean toggle, String group) { return (BoundAction)configureAction(new BoundAction(name, id), mnemonic, toggle, group); }
public static CompositeAction createCompositeAction(String id, String name, String mnemonic, boolean toggle, String group) { return (CompositeAction)configureAction(new CompositeAction(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); }