Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.yaac.gui.pluginadapter
Class MenuAction

    java.lang.Object
      org.ka2ddo.yaac.gui.pluginadapter.MenuAction

All Implemented Interfaces:
  java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener, javax.swing.Action, AbstractMenuActionPropertyListener

    public class MenuAction

extends java.lang.Object
implements javax.swing.Action, AbstractMenuActionPropertyListener, java.awt.event.ItemListener

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

### MenuAction

    public MenuAction(AbstractMenuAction abstractMenuAction)

Method Detail

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

  Adds a `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.

  Specified by:
    `addPropertyChangeListener` in interface `javax.swing.Action`
  Parameters:
    `listener` - a `PropertyChangeListener` object

### getValue

    public java.lang.Object getValue(java.lang.String key)

  Gets one of this object's properties using the associated key.

  Specified by:
    `getValue` in interface `javax.swing.Action`
  See Also:
    `putValue(java.lang.String, java.lang.Object)`

### putValue

    public void putValue(java.lang.String key,
                         java.lang.Object value)

  Sets one of this object's properties using the associated key. If the value has changed, a `PropertyChangeEvent` is sent to listeners.

  Specified by:
    `putValue` in interface `javax.swing.Action`
  Parameters:
    `key` - a `String` containing the key
    `value` - an `Object` value

### setEnabled

    public void setEnabled(boolean b)

  Sets the enabled state of the `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.

  Specified by:
    `setEnabled` in interface `javax.swing.Action`
  Parameters:
    `b` - true to enable this `Action`, false to disable it

### isEnabled

    public boolean isEnabled()

  Returns the enabled state of the `Action`. When enabled, any component associated with this object is active and able to fire this object's `actionPerformed` method.

  Specified by:
    `isEnabled` in interface `javax.swing.Action`
  Returns:
    true if this `Action` is enabled

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

  Removes a `PropertyChange` listener.

  Specified by:
    `removePropertyChangeListener` in interface `javax.swing.Action`
  Parameters:
    `listener` - a `PropertyChangeListener` object
  See Also:
    `addPropertyChangeListener(java.beans.PropertyChangeListener)`

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Invoked when an action occurs.

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

### menuPropertyChanged

    public void menuPropertyChanged(java.lang.String propertyName,
                                    java.lang.Object oldValue,
                                    java.lang.Object newValue)

  Tell the listener that a property has changed.

  Specified by:
    `menuPropertyChanged` in interface `AbstractMenuActionPropertyListener`
  Parameters:
    `propertyName` - String name of property
    `oldValue` - Object value before the change
    `newValue` - Object value after the change

### itemStateChanged

    public void itemStateChanged(java.awt.event.ItemEvent e)

  Specified by:
    `itemStateChanged` in interface `java.awt.event.ItemListener`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD