|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.gui.pluginadapter.MenuAction
public class MenuAction
This class defines a Java Swing specific wrapper around the now GUI-independent AbstractMenuAction class in the plugin API package.
Field Summary |
---|
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 | |
---|---|
MenuAction(AbstractMenuAction abstractMenuAction)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChange listener. |
java.lang.Object |
getValue(java.lang.String key)
Gets one of this object's properties using the associated key. |
boolean |
isEnabled()
Returns the enabled state of the Action . |
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
void |
menuPropertyChanged(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Tell the listener that a property has changed. |
void |
putValue(java.lang.String key,
java.lang.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 |
Constructor Detail |
---|
public MenuAction(AbstractMenuAction abstractMenuAction)
Method Detail |
---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
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 javax.swing.Action
listener
- a PropertyChangeListener
objectpublic java.lang.Object getValue(java.lang.String key)
getValue
in interface javax.swing.Action
putValue(java.lang.String, java.lang.Object)
public void putValue(java.lang.String key, java.lang.Object value)
PropertyChangeEvent
is sent
to listeners.
putValue
in interface javax.swing.Action
key
- a String
containing the keyvalue
- an Object
valuepublic void setEnabled(boolean b)
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 javax.swing.Action
b
- true to enable this Action
, false to disable itpublic boolean isEnabled()
Action
. When enabled,
any component associated with this object is active and
able to fire this object's actionPerformed
method.
isEnabled
in interface javax.swing.Action
Action
is enabledpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
PropertyChange
listener.
removePropertyChangeListener
in interface javax.swing.Action
listener
- a PropertyChangeListener
objectaddPropertyChangeListener(java.beans.PropertyChangeListener)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void menuPropertyChanged(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
menuPropertyChanged
in interface AbstractMenuActionPropertyListener
propertyName
- String name of propertyoldValue
- Object value before the changenewValue
- Object value after the changepublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |