|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.JComponent.ActionStandin
ActionStandin
is used as a standin for
ActionListeners
that are
added via registerKeyboardAction
.
Field Summary | |
private Action |
action
|
private ActionListener |
actionListener
|
private String |
command
|
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
(package private) |
JComponent.ActionStandin(ActionListener actionListener,
String command)
|
Method Summary | |
void |
actionPerformed(ActionEvent ae)
Invoked when an action occurs. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChange listener. |
Object |
getValue(String key)
Gets one of this object's properties using the associated key. |
boolean |
isEnabled()
Returns the enabled state of the Action . |
void |
putValue(String key,
Object value)
Sets one of this object's properties using the associated key. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChange listener. |
void |
setEnabled(boolean b)
Sets the enabled state of the Action . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final ActionListener actionListener
private final String command
private final Action action
Constructor Detail |
JComponent.ActionStandin(ActionListener actionListener, String command)
Method Detail |
public Object getValue(String key)
Action
getValue
in interface Action
Action.putValue(java.lang.String, java.lang.Object)
public boolean isEnabled()
Action
Action
. When enabled,
any component associated with this object is active and
able to fire this object's actionPerformed
method.
isEnabled
in interface Action
Action
is enabledpublic void actionPerformed(ActionEvent ae)
ActionListener
actionPerformed
in interface ActionListener
public void putValue(String key, Object value)
Action
PropertyChangeEvent
is sent
to listeners.
putValue
in interface Action
key
- a String
containing the keyvalue
- an Object
valuepublic void setEnabled(boolean b)
Action
Action
. When enabled,
any component associated with this object is active and
able to fire this object's actionPerformed
method.
If the value has changed, a PropertyChangeEvent
is sent
to listeners.
setEnabled
in interface Action
b
- true to enable this Action
, false to disable itpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Action
PropertyChange
listener. Containers and attached
components use these methods to register interest in this
Action
object. When its enabled state or other property
changes, the registered listeners are informed of the change.
addPropertyChangeListener
in interface Action
listener
- a PropertyChangeListener
objectpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Action
PropertyChange
listener.
removePropertyChangeListener
in interface Action
listener
- a PropertyChangeListener
objectAction.addPropertyChangeListener(java.beans.PropertyChangeListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |