javax.swing
public interface Action extends ActionListener
Field Summary | |
---|---|
String | ACCELERATOR_KEY
A key to access the {@link KeyStroke} used as the accelerator for the
action. |
String | ACTION_COMMAND_KEY
A key to access the action command string for the action. |
String | DEFAULT
A key to access the default property for the action (this is not used). |
String | LONG_DESCRIPTION
A key to access the long description for the action. |
String | MNEMONIC_KEY
A key to access the mnemonic for the action. |
String | NAME
A key to access the name for the action. |
String | SHORT_DESCRIPTION
A key to access the short description for the action (the short
description is typically used as the tool tip text). |
String | SMALL_ICON
A key to access the icon for the action. |
Method Summary | |
---|---|
void | addPropertyChangeListener(PropertyChangeListener listener)
Registers a listener to receive notification whenever one of the
action's properties is modified.
|
Object | getValue(String key)
Returns the value associated with the specified key.
|
boolean | isEnabled()
Returns the flag that indicates whether or not this action is enabled.
|
void | putValue(String key, Object value)
Sets the value associated with the specified key and sends a
{@link java.beans.PropertyChangeEvent} to all registered listeners.
|
void | removePropertyChangeListener(PropertyChangeListener listener)
Deregisters a listener so that it no longer receives notification of
changes to the action's properties.
|
void | setEnabled(boolean b)
Sets the flag that indicates whether or not this action is enabled. |
Parameters: listener the listener.
Parameters: key the key (not null
).
Returns: The value associated with the specified key, or
null
if the key is not found.
Returns: The flag.
Parameters: key the key (not null
). value the value (null
permitted).
Parameters: listener the listener.
Parameters: b the new value of the flag.