org.yasl.logging.action
Class YASLLoggingComponentAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.yasl.arch.impl.action.YASLGUIAbstractAction
          extended byorg.yasl.arch.impl.action.YASLSwingAbstractAction
              extended byorg.yasl.logging.action.YASLLoggingComponentAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable, YASLLogManagerListener

public class YASLLoggingComponentAction
extends YASLSwingAbstractAction
implements YASLLogManagerListener

Version:
1.0
Author:
Jeff Chapman
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.yasl.arch.impl.action.YASLGUIAbstractAction
COMMAND_SYNCHRONOUS_CALL
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
YASLLoggingComponentAction(String name, boolean initialState, ImageIcon imageIcon, YASLSwingApplication yaslApp)
          Sets the NAME and SHORT_DESCRIPTION properties to the value of the name param.
YASLLoggingComponentAction(String name, boolean initialState, YASLSwingApplication yaslApp)
          Sets the NAME and SHORT_DESCRIPTION properties to the value of the name param.
YASLLoggingComponentAction(String name, String shortName, boolean initialState, ImageIcon imageIcon, YASLSwingApplication yaslApp)
          Sets the NAME, SHORT_DESCRIPTION, and SMALL_ICON properties.
YASLLoggingComponentAction(String name, String shortName, boolean initialState, YASLSwingApplication yaslApp)
          Sets the NAME and SHORT_DESCRIPTION properties.
 
Method Summary
 void changeToLogManagerState(YASLLogManagerEvent event)
          When the log manager is closed, the action will be returned to it's initial state.
protected  void performAction(ActionEvent e)
          Abstract method that is called from the actionPerformed method.
 
Methods inherited from class org.yasl.arch.impl.action.YASLSwingAbstractAction
getYASLSwingApplication
 
Methods inherited from class org.yasl.arch.impl.action.YASLGUIAbstractAction
actionPerformed, getInitialState, getName, getYASLApplication, getYASLGUIApplication, setName, setName, setToInitialState
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YASLLoggingComponentAction

public YASLLoggingComponentAction(String name,
                                  boolean initialState,
                                  YASLSwingApplication yaslApp)
Sets the NAME and SHORT_DESCRIPTION properties to the value of the name param. Stores a reference to the YASLSwingApplication instance and sets the action to the passed initialState.

Parameters:
name - String
initialState - boolean
yaslApp - YASLSwingApplication

YASLLoggingComponentAction

public YASLLoggingComponentAction(String name,
                                  boolean initialState,
                                  ImageIcon imageIcon,
                                  YASLSwingApplication yaslApp)
Sets the NAME and SHORT_DESCRIPTION properties to the value of the name param. Also sets the SMALL_ICON property. Stores a reference to the YASLSwingApplication instance and sets the action to the passed initialState.

Parameters:
name - String
initialState - boolean
imageIcon - ImageIcon
yaslApp - YASLSwingApplication

YASLLoggingComponentAction

public YASLLoggingComponentAction(String name,
                                  String shortName,
                                  boolean initialState,
                                  YASLSwingApplication yaslApp)
Sets the NAME and SHORT_DESCRIPTION properties. Stores a reference to the YASLSwingApplication instance and sets the action to the passed initialState.

Parameters:
name - String
shortName - String
initialState - boolean
yaslApp - YASLSwingApplication

YASLLoggingComponentAction

public YASLLoggingComponentAction(String name,
                                  String shortName,
                                  boolean initialState,
                                  ImageIcon imageIcon,
                                  YASLSwingApplication yaslApp)
Sets the NAME, SHORT_DESCRIPTION, and SMALL_ICON properties. Stores a reference to the YASLSwingApplication instance and sets the action to the passed initialState.

Parameters:
name - String
shortName - String
initialState - boolean
imageIcon - ImageIcon
yaslApp - YASLSwingApplication
Method Detail

performAction

protected void performAction(ActionEvent e)
                      throws Exception
Abstract method that is called from the actionPerformed method.

Specified by:
performAction in class YASLGUIAbstractAction
Parameters:
e - ActionEvent
Throws:
Exception

changeToLogManagerState

public void changeToLogManagerState(YASLLogManagerEvent event)
When the log manager is closed, the action will be returned to it's initial state. When the log manager is opened, the action will be set to disabled.

Specified by:
changeToLogManagerState in interface YASLLogManagerListener
Parameters:
event - YASLLogManagerEvent