dsto.dfc.swing.commands
Class CommandActionAdapter

java.lang.Object
  extended by dsto.dfc.util.BasicPropertyEventSource
      extended by dsto.dfc.swing.commands.CommandActionAdapter
All Implemented Interfaces:
Copyable, JavaBean, PropertyEventSource, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action

public class CommandActionAdapter
extends BasicPropertyEventSource
implements Action, PropertyChangeListener

Adapts a Command instance to look like a JFC Action instance.

Version:
$Revision$
See Also:
Serialized Form

Field Summary
protected  Command command
           
 
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
CommandActionAdapter(Command command)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 Object getValue(String key)
           
 boolean isEnabled()
           
 void propertyChange(PropertyChangeEvent e)
           
 void putValue(String key, Object value)
           
 void setEnabled(boolean b)
           
 
Methods inherited from class dsto.dfc.util.BasicPropertyEventSource
addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener, setPropertyChangeSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

command

protected Command command
Constructor Detail

CommandActionAdapter

public CommandActionAdapter(Command command)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getValue

public Object getValue(String key)
Specified by:
getValue in interface Action

putValue

public void putValue(String key,
                     Object value)
Specified by:
putValue in interface Action

setEnabled

public void setEnabled(boolean b)
Specified by:
setEnabled in interface Action

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Action

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener


Copyright © 2008 Commonwealth of Australia