Class SimpleBooleanAction

    • Constructor Detail

      • SimpleBooleanAction

        public SimpleBooleanAction(String name,
                                   String description)
        Create a SimpleBooleanAction that provides name and description
        Parameters:
        name - the name of the action
        description - the short description of the action
      • SimpleBooleanAction

        public SimpleBooleanAction(String name,
                                   String description,
                                   Icon icon)
        Create a SimpleBooleanAction that provides name, description and an icon
        Parameters:
        name - the name of the action
        description - the short description of the action
        icon - the icon used in menus
      • SimpleBooleanAction

        public SimpleBooleanAction(String name,
                                   String description,
                                   String resourceIcon)
        Create a SimpleBooleanAction that provides name, description and an icon
        Parameters:
        name - the name of the action
        description - the short description of the action
        resourceIcon - a resource to decode the icon used in menus from
    • Method Detail

      • getState

        public abstract boolean getState()
        Returns:
        whether this action is enabled.
      • toggleState

        public abstract void toggleState()
        implement what happens when the state is toggled.
      • actionPerformed

        public void actionPerformed(ActionEvent e)