dsto.dfc.swing.commands
Class AbstractMutableCommand

java.lang.Object
  extended by dsto.dfc.swing.commands.AbstractCommand
      extended by dsto.dfc.swing.commands.AbstractMutableCommand
All Implemented Interfaces:
Command, Iconic, Copyable, PropertyEventSource, ActionListener, Cloneable, EventListener
Direct Known Subclasses:
AbstractBooleanCommand, AbstractCnpCommand, AbstractCompositeCommand, AbstractEnumeratedCommand, AbstractSelectionBasedCommand, AbstractUndoableCommand, BasicFileSaveAsCommand, BasicFileSaveCommand, BasicPropertiesCommand, CmdClosePanel, CmdFloatPanel, CmdPageLayoutPanel, CmdPrintPanel, CmdPrintPreviewPanel

public abstract class AbstractMutableCommand
extends AbstractCommand
implements PropertyEventSource

Base class for commands that have changeable properties. Provides PropertyEventSource implementation and a mutable "enabled" property.

Version:
$Revision$

Field Summary
protected  BasicPropertyEventSource listeners
           
 
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand
displayName, icon
 
Fields inherited from interface dsto.dfc.swing.icons.Iconic
NULL_ICON
 
Constructor Summary
AbstractMutableCommand()
           
AbstractMutableCommand(String iconName)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 Object clone()
          Create a completely separate copy of this object and any mutable objects owned by the object.
 boolean isEnabled()
          Returns true.
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void setEnabled(boolean newValue)
           
 void setIcon(Icon newIcon)
           
 
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand
actionPerformed, canReplace, execute, getAccelerator, getDefaultDisplayName, getDescription, getDisplayName, getGroupInView, getIcon, getLargeIcon, getLogString, getMnemonic, getName, isInteractive, setDisplayName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected transient BasicPropertyEventSource listeners
Constructor Detail

AbstractMutableCommand

public AbstractMutableCommand()

AbstractMutableCommand

public AbstractMutableCommand(String iconName)
Method Detail

isEnabled

public boolean isEnabled()
Description copied from class: AbstractCommand
Returns true.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class AbstractCommand

setEnabled

public void setEnabled(boolean newValue)

setIcon

public void setIcon(Icon newIcon)
Overrides:
setIcon in class AbstractCommand

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface PropertyEventSource

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Specified by:
removePropertyChangeListener in interface PropertyEventSource

clone

public Object clone()
Description copied from interface: Copyable
Create a completely separate copy of this object and any mutable objects owned by the object.

NOTE: subclasses should not remove the CloneNotSupportedException throws clause if they themselves support subclassing: removing the CloneNotSupportedException declaration stops subclasses from indicating that a clone was not possible.

Specified by:
clone in interface Copyable
Overrides:
clone in class AbstractCommand


Copyright © 2008 Commonwealth of Australia