Class ProxyActionPrototype

    • Constructor Detail

      • ProxyActionPrototype

        public ProxyActionPrototype​(ActionPrototype proxiedPrototype)
        Proxied prototype constructor.
        Parameters:
        proxiedPrototype - The prototype proxied by this prototype.
        Throws:
        java.lang.NullPointerException - if the given proxied prototype is null is null.
    • Method Detail

      • getRepeatActionListener

        protected ActionListener getRepeatActionListener()
        Returns:
        An action listener to repeat copies of events received, using this object as the source.
      • performAction

        public void performAction​(int force,
                                  int option)
        Performs the action with the given force and option. An ActionEvent is fired to all registered ActionListeners.

        This implementation calls ActionModel.performAction(int, int) on the proxied prototype to perform the actual action. An ActionEvent is not fired to registered ActionListeners; the proxied action prototype should fire such an event, which we will them repeat.

        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 initiaged 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.