org.ocd.cmdmgr
Class DefaultCmdAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.ocd.cmdmgr.DefaultCmdAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, ICmdAction, IXMLPersistable, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
AppletCmdAction, JNLPCmdAction, NativeAppAction, WebCmdAction

public abstract class DefaultCmdAction
extends javax.swing.AbstractAction
implements ICmdAction, IXMLPersistable, java.beans.PropertyChangeListener

Since:
$Date: 2002/06/12 03:58:03 $
Version:
$Revision: 1.3 $
Author:
$Author: drichan $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)
See Also:
Serialized Form

Field Summary
protected  java.lang.String extensionHREF
           
protected  java.lang.String extensionName
           
protected  java.lang.String extensionVersion
           
protected  boolean isStarted_flag
           
protected  boolean xmlChanged_flag
           
protected  XMLProperties xmlProps
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface org.ocd.cmdmgr.ICmdAction
LARGE_ICON
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Fields inherited from interface org.ocd.blx.IXMLPersistable
BLX_CLASS_NAME_ATTR, BLX_COMP_HEIGHT_ATTR, BLX_COMP_ID, BLX_COMP_NODE_NAME, BLX_COMP_WIDTH_ATTR, BLX_COMP_X_ATTR, BLX_COMP_Y_ATTR, BLX_DOCUMENT_NAME, BLX_EXT_HREF_ATTR, BLX_EXT_VERSION_ATTR, BLX_EXTENSION_ATTR, BLX_FACTORY_NODE_NAME, BLX_FACTORY_TYPE_ATTR, BLX_HREF_ATTR, BLX_NS, BLX_OBJ_NODE_NAME, COMP_TYPE, COMPONENT_FACTORY_TYPE, COMPONENT_FACTORY_TYPE_STR, FACTORY_TYPE, FILE_EXT, OBJECT_FACTORY_TYPE, OBJECT_FACTORY_TYPE_STR, OBJECT_TYPE
 
Constructor Summary
protected DefaultCmdAction()
          Sub Classes must call this Constructor to Initialize the DefaultAction
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Called with the Action has Been Triggered
 org.w3c.dom.Element getBLXElement()
          Get the BLX-Node for this Component
 java.lang.String getDescription()
          Get the Name of the Task
abstract  ICmdFactory getFactory()
          Get the Factory that created this Command
 java.lang.String getName()
          Get the Name of the Task
 org.w3c.dom.Element getXMLElement()
          Get the Data Node for this Component
 boolean isStarted()
          Return true if the Action has been Started
 void propertyChange(java.beans.PropertyChangeEvent evt)
          One of the Action's Properties has been Changed
 void setBLXElement(org.w3c.dom.Element pElement, java.net.URL pRelativeURL)
          Set the Node on this Component
 void setDescription(java.lang.String desc)
          Set the Name of the Task
 void setName(java.lang.String name)
          Set the Name of the Task
protected  void setXMLHasChanged(boolean value)
          Set the XMLHasChanged flag for this Object
 boolean xmlHasChanged()
          Return true if this components state has changed in a way that Requires a new XML Node to be fetched
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ocd.cmdmgr.ICmdAction
destroy, start, stop
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Field Detail

xmlChanged_flag

protected boolean xmlChanged_flag

isStarted_flag

protected boolean isStarted_flag

xmlProps

protected XMLProperties xmlProps

extensionName

protected java.lang.String extensionName

extensionHREF

protected java.lang.String extensionHREF

extensionVersion

protected java.lang.String extensionVersion
Constructor Detail

DefaultCmdAction

protected DefaultCmdAction()
Sub Classes must call this Constructor to Initialize the DefaultAction
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
One of the Action's Properties has been Changed
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt -  

isStarted

public boolean isStarted()
Return true if the Action has been Started
Specified by:
isStarted in interface ICmdAction
Returns:
boolean

setName

public void setName(java.lang.String name)
Set the Name of the Task
Parameters:
name -  

getName

public java.lang.String getName()
Get the Name of the Task
Returns:
name

setDescription

public void setDescription(java.lang.String desc)
Set the Name of the Task
Parameters:
name -  

getDescription

public java.lang.String getDescription()
Get the Name of the Task
Returns:
name

setBLXElement

public void setBLXElement(org.w3c.dom.Element pElement,
                          java.net.URL pRelativeURL)
Set the Node on this Component
Specified by:
setBLXElement in interface IXMLPersistable
Parameters:
pElement - Node that contains this components settings
pRelativeURL - the URL that all HREFs would be relative to

getXMLElement

public org.w3c.dom.Element getXMLElement()
Get the Data Node for this Component
Specified by:
getXMLElement in interface IXMLPersistable
Returns:
the Node that contains this Components Settings

getBLXElement

public org.w3c.dom.Element getBLXElement()
Get the BLX-Node for this Component
Specified by:
getBLXElement in interface IXMLPersistable
Returns:
the Node that contains this Components blx Settings

xmlHasChanged

public boolean xmlHasChanged()
Return true if this components state has changed in a way that Requires a new XML Node to be fetched
Specified by:
xmlHasChanged in interface IXMLPersistable
Returns:
true if component has changed

setXMLHasChanged

protected void setXMLHasChanged(boolean value)
Set the XMLHasChanged flag for this Object
Parameters:
value - true if the Objects XML has Changed

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Called with the Action has Been Triggered
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class javax.swing.AbstractAction
Parameters:
event - that triggered the Action

getFactory

public abstract ICmdFactory getFactory()
Get the Factory that created this Command