textmaven.application.swinggui.actions
Class BaseAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bytextmaven.application.swinggui.actions.BaseAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
AboutAction, AddAllDictionaryAction, CloseFileAction, CompletionAction, CopyLineAction, CutLineAction, DeleteLineAction, ExitAction, InsertLineAction, NewFileAction, NextFieldAction, NextLineAction, NextTabPaneAction, OpenFileAction, PasteLineAction, RemoveAllDictionaryAction, ResetDictionaryAction, SaveAsFileAction, SaveFileAction, SetDictionaryAction

public abstract class BaseAction
extends javax.swing.AbstractAction

Author:
krebtho
See Also:
Serialized Form

Field Summary
protected  javax.swing.Action mFollowUp
           
 
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
protected BaseAction(java.lang.String baseName)
          The name specified is used to lookup resources in resource file.
 
Method Summary
abstract  void actionPerformed(java.awt.event.ActionEvent e)
           
 javax.swing.KeyStroke getAcceleratorKey()
          Convenience method to get the accelerator keystroke.
 javax.swing.ImageIcon getIcon()
          Convenience method to get the icon associated with action
 java.lang.String getLabel()
          Convenience method to get label.
 java.lang.String getShortDescription()
          Convenience method to get short description associated with action.
protected  void init(java.lang.String baseName)
           
 void setFollowUp(javax.swing.Action followUp)
          Sets the follow up action which should be performed after this instances action has been performed.
 
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
 

Field Detail

mFollowUp

protected javax.swing.Action mFollowUp
Constructor Detail

BaseAction

protected BaseAction(java.lang.String baseName)
The name specified is used to lookup resources in resource file. The following rules are applied for resource lookup:

Parameters:
baseName - base identification for the resources associated with this action
Method Detail

init

protected void init(java.lang.String baseName)

setFollowUp

public void setFollowUp(javax.swing.Action followUp)
Sets the follow up action which should be performed after this instances action has been performed. It is up to the subclass to initiate this action

Parameters:
followUp -

getAcceleratorKey

public javax.swing.KeyStroke getAcceleratorKey()
Convenience method to get the accelerator keystroke.

Returns:
KeyStroke.

getLabel

public java.lang.String getLabel()
Convenience method to get label.

Returns:
action label

getShortDescription

public java.lang.String getShortDescription()
Convenience method to get short description associated with action.

Returns:
short description of action

getIcon

public javax.swing.ImageIcon getIcon()
Convenience method to get the icon associated with action

Returns:
action icon

actionPerformed

public abstract void actionPerformed(java.awt.event.ActionEvent e)


Copyright © 2002-2005 Sourceforge. All Rights Reserved.