net.sourceforge.nite.gui.actions
Class NiteAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.sourceforge.nite.gui.actions.NiteAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
XMLAction

public class NiteAction
extends javax.swing.AbstractAction

Author:
judyr Abstract actions are useful because you can create one action handling class for several outputComponents which need to do the same thing, such as a save button and a save menu item Furthermore, they can be added as event handlers to most Swing outputComponents which are used in NITE
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
NiteAction()
           
NiteAction(JDomParser parser)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          When this action is executed, collect the user input from the source, and initiate the action.
 void addComponentID(java.lang.String id)
           
 void addInputComponent(InputComponent s)
           
 void addInputComponentID(java.lang.String id)
           
 void addIntermediateComponent(JComponentHandler j)
           
 void addOutputComponent(OutputComponent j)
           
 void addPopupContext(java.lang.String attribute, java.lang.String optionValue)
          Method addOptionValue.
 void addXmlAction(NiteAction a)
           
 java.lang.String getActionType()
           
 java.lang.String getAttributeName()
           
 java.util.List getComponentsIDs()
          Returns the componentsIDs.
 java.lang.String getDescription()
          Returns the description.
 Displayer getDisplayer()
          Returns the displayer which is the object claiming it can redisplay after this action.
 java.lang.String getId()
          Returns the id.
 java.util.List getInputComponentIDs()
           
 java.util.List getInputComponents()
          Returns the swingTargets.
 java.util.List getOptionValues(java.lang.String attribute)
          Returns the optionValues.
 java.util.List getOutputComponentIDs()
           
 java.util.List getOutputComponents()
           
 JDomParser getParser()
          Returns the parser.
 void setActionType(java.lang.String actionType)
          Sets the actionType.
 void setAttributeName(java.lang.String attributeName)
          Sets the attributeName.
 void setComponentsIDs(java.util.List componentsIDs)
          Sets the componentsIDs.
 void setDescription(java.lang.String description)
          Sets the description.
 void setDisplayer(Displayer displayer)
          Sets the displayer which is the object claiming it can redisplay after this action.
 void setId(java.lang.String id)
          Sets the id.
 void setInputComponents(java.util.List ic)
           
 void setOutputComponents(java.util.List outputComponents)
          Sets the outputComponents.
 void setParser(JDomParser parser)
          Sets the parser.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NiteAction

public NiteAction(JDomParser parser)

NiteAction

public NiteAction()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
When this action is executed, collect the user input from the source, and initiate the action.

See Also:
ActionListener.actionPerformed(ActionEvent)

addInputComponent

public void addInputComponent(InputComponent s)

addOutputComponent

public void addOutputComponent(OutputComponent j)

addIntermediateComponent

public void addIntermediateComponent(JComponentHandler j)

addInputComponentID

public void addInputComponentID(java.lang.String id)

addComponentID

public void addComponentID(java.lang.String id)

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
String

getId

public java.lang.String getId()
Returns the id.

Returns:
String

getInputComponents

public java.util.List getInputComponents()
Returns the swingTargets.

Returns:
List

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - The description to set

setId

public void setId(java.lang.String id)
Sets the id.

Parameters:
id - The id to set

setInputComponents

public void setInputComponents(java.util.List ic)

getOutputComponentIDs

public java.util.List getOutputComponentIDs()

getInputComponentIDs

public java.util.List getInputComponentIDs()

getComponentsIDs

public java.util.List getComponentsIDs()
Returns the componentsIDs.

Returns:
List

setComponentsIDs

public void setComponentsIDs(java.util.List componentsIDs)
Sets the componentsIDs.

Parameters:
componentsIDs - The componentsIDs to set

addPopupContext

public void addPopupContext(java.lang.String attribute,
                            java.lang.String optionValue)
Method addOptionValue.

Parameters:
option -

getOptionValues

public java.util.List getOptionValues(java.lang.String attribute)
Returns the optionValues.

Returns:
List

getParser

public JDomParser getParser()
Returns the parser. This is only relevant for stylesheet display

Returns:
JDomParser

setParser

public void setParser(JDomParser parser)
Sets the parser.

Parameters:
parser - The parser to set

setDisplayer

public void setDisplayer(Displayer displayer)
Sets the displayer which is the object claiming it can redisplay after this action. This will override any default redisplay behaviour.


getDisplayer

public Displayer getDisplayer()
Returns the displayer which is the object claiming it can redisplay after this action.


getActionType

public java.lang.String getActionType()
Returns:
String

setActionType

public void setActionType(java.lang.String actionType)
Sets the actionType.

Parameters:
actionType - The actionType to set

addXmlAction

public void addXmlAction(NiteAction a)
Parameters:
object -

getAttributeName

public java.lang.String getAttributeName()
Returns:
String

setAttributeName

public void setAttributeName(java.lang.String attributeName)
Sets the attributeName.

Parameters:
attributeName - The attributeName to set

getOutputComponents

public java.util.List getOutputComponents()
Returns:
List

setOutputComponents

public void setOutputComponents(java.util.List outputComponents)
Sets the outputComponents.

Parameters:
outputComponents - The outputComponents to set