eTextReader.actions
Class QuickAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by eTextReader.actions.BaseAction
          extended by eTextReader.actions.BrowserAction
              extended by eTextReader.actions.QuickAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
QuickDiagramAction, QuickDiscussionAction, QuickLinkAction, QuickNoteAction, QuickTextAction

public abstract class QuickAction
extends BrowserAction
implements java.beans.PropertyChangeListener

Author:
mcfall
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class eTextReader.actions.BaseAction
BaseAction.Key
 
Field Summary
private  Notation.AnnotationType annotationType
           
 
Fields inherited from class eTextReader.actions.BrowserAction
browser
 
Fields inherited from class eTextReader.actions.BaseAction
instances
 
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
QuickAction(ContentContainer browser, java.lang.String filename, Notation.AnnotationType annotationType)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  javax.swing.KeyStroke getAcceleratorKeyStrokeFromPreferences()
          Returns the KeyStroke associated with this action from the user's application preferences.
abstract  java.lang.String getActionCommand()
           
private  Notation.AnnotationType getAnnotationType()
          Retrieves the AnnotationType object associated with this quick action
abstract  java.lang.String getText()
           
abstract  java.lang.String getTooltipText()
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Handles changes to the user and accelrator key properties by reseting the accelerator associated with the action
 
Methods inherited from class eTextReader.actions.BaseAction
getInstance
 
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

annotationType

private Notation.AnnotationType annotationType
Constructor Detail

QuickAction

public QuickAction(ContentContainer browser,
                   java.lang.String filename,
                   Notation.AnnotationType annotationType)
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Handles changes to the user and accelrator key properties by reseting the accelerator associated with the action

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class BaseAction

getAnnotationType

private Notation.AnnotationType getAnnotationType()
Retrieves the AnnotationType object associated with this quick action

Returns:

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getTooltipText

public abstract java.lang.String getTooltipText()

getText

public abstract java.lang.String getText()

getActionCommand

public abstract java.lang.String getActionCommand()

getAcceleratorKeyStrokeFromPreferences

protected javax.swing.KeyStroke getAcceleratorKeyStrokeFromPreferences()
Description copied from class: BaseAction
Returns the KeyStroke associated with this action from the user's application preferences. The default implementation here returns null. Any action that wants to associate an accelerator with its action that will be maintained by the ApplicationPreferences class should override this method to load the KeyStroke from the user's application preferences

Overrides:
getAcceleratorKeyStrokeFromPreferences in class BaseAction
Returns: