Class AbstractActionControl

    • Constructor Detail

      • AbstractActionControl

        public AbstractActionControl​(InfoModel infoModel,
                                     ActionModel actionModel,
                                     Enableable enableable)
        Info model, action model, and enableable object constructor.
        Parameters:
        infoModel - The component info model.
        actionModel - The component action model.
        enableable - The enableable object in which to store enabled status.
        Throws:
        java.lang.NullPointerException - if the given info model, action model, and/or enableable object is null.
    • Method Detail

      • getActionModel

        protected ActionModel getActionModel()
        Returns:
        The action model used by this component.
      • isRollover

        public boolean isRollover()
        Specified by:
        isRollover in interface ActionControl
        Returns:
        Whether the component is in a rollover state.
      • setRollover

        public void setRollover​(boolean newRollover)
        Description copied from interface: ActionControl
        Sets whether the component is in a rollover state. This is a bound property of type Boolean.
        Specified by:
        setRollover in interface ActionControl
        Parameters:
        newRollover - true if the component should be in a rollover state, else false.
        See Also:
        ActionControl.ROLLOVER_PROPERTY
      • performAction

        public void performAction​(int force,
                                  int option)
        Description copied from interface: ActionModel
        Performs the action with the given force and option. An ActionEvent is fired to all registered ActionListeners.
        Specified by:
        performAction in interface ActionModel
        Parameters:
        force - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.
        option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiated by a mouse right button click.
      • fireActionPerformed

        protected void fireActionPerformed​(int force,
                                           int option)
        Fires an action event to all registered action listeners. This method delegates to fireActionPerformed(ActionEvent).
        Parameters:
        force - The zero-based force, such as 0 for no force or 1 for an action initiated by from a mouse single click.
        option - The zero-based option, such as 0 for an event initiated by a mouse left button click or 1 for an event initiated by a mouse right button click.
        See Also:
        ActionListener, ActionEvent
      • fireActionPerformed

        protected void fireActionPerformed​(ActionEvent actionEvent)
        Fires a given action event to all registered action listeners.
        Parameters:
        actionEvent - The action event to fire.