Package org.ka2ddo.yaac.gui
Class CloseWindowCommandAction
java.lang.Object
javax.swing.AbstractAction
org.ka2ddo.yaac.gui.CloseWindowCommandAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
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:
-
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorDescriptionCloseWindowCommandAction
(Component component, String title) Create a button Action to close the specified window upon command.CloseWindowCommandAction
(Window window, String title) Create a button Action to close the specified window upon command.CloseWindowCommandAction
(String title) Create a button Action to close the specified window upon command. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Do not call.void
setComponent
(Component component) Specify the Component to be associated with this Action.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
CloseWindowCommandAction
Create a button Action to close the specified window upon command.- Parameters:
window
- Window subclass instance to closetitle
- localized String title to put on button created with this Action
-
CloseWindowCommandAction
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
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 tosetComponent(Component)
.- Parameters:
title
- localized String title to put on button created with this Action
-
-
Method Details
-
setComponent
Specify the Component to be associated with this Action.- Parameters:
component
- Component that will consume and trigger this Action.
-
actionPerformed
Do not call. Called when action needs to invoke listener to close window.- Parameters:
e
- ActionEvent identifying the commanding widget
-