Class CloseWindowCommandAction

java.lang.Object
javax.swing.AbstractAction
org.ka2ddo.yaac.gui.CloseWindowCommandAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public final class CloseWindowCommandAction extends AbstractAction
This is a helper class for the common operation of closing a window widget when commanded to by the user.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • CloseWindowCommandAction

      public CloseWindowCommandAction(Window window, String title)
      Create a button Action to close the specified window upon command.
      Parameters:
      window - Window subclass instance to close
      title - localized String title to put on button created with this Action
    • CloseWindowCommandAction

      public CloseWindowCommandAction(Component component, String title)
      Create a button Action to close the specified window upon command.
      Parameters:
      component - Component that will consume and trigger this Action.
      title - localized String title to put on button created with this Action
    • CloseWindowCommandAction

      public CloseWindowCommandAction(String title)
      Create a button Action to close the specified window upon command. This Action must be informed of the button it is subsequently connected to by a call to setComponent(Component).
      Parameters:
      title - localized String title to put on button created with this Action
  • Method Details

    • setComponent

      public void setComponent(Component component)
      Specify the Component to be associated with this Action.
      Parameters:
      component - Component that will consume and trigger this Action.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Do not call. Called when action needs to invoke listener to close window.
      Parameters:
      e - ActionEvent identifying the commanding widget