eTextReader.actions
Class CurrentAnnotationListingAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by eTextReader.actions.BaseAction
          extended by eTextReader.actions.CurrentAnnotationAction
              extended by eTextReader.actions.CurrentAnnotationListingAction
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:
CurrentAuthorListingAction, CurrentHighlightAnnotationAction, CurrentTypeListingAction

public abstract class CurrentAnnotationListingAction
extends CurrentAnnotationAction

Facilitates showing a NotationListing whose contents are determined by the current annotation. Extends CurrentAnnotationAction in order to get the annotation tracking capability implemented by that class, while handling of the action event is delegated to an instance of NotationListingAction.

In order to facilitate displaying a NotationListing based on the currently selected annotation, two classes are created:

For example, the class CurrentTypeListingAction is associated with the class AnnotationTypeAction, which provides the method AnnotationTypeAction.setType(eTextReader.clientInterface.Notation.AnnotationType) to configure which type of annotation should be included in the annotation listing. CurrentTypeListingAction constructs an instance of AnnotationTypeListing and changes the type that instance is associated with whenever an annotation is entered.

Author:
mcfall
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class eTextReader.actions.CurrentAnnotationAction
CurrentAnnotationAction.NotationHandler
 
Nested classes/interfaces inherited from class eTextReader.actions.BaseAction
BaseAction.Key
 
Field Summary
 
Fields inherited from class eTextReader.actions.CurrentAnnotationAction
notationHandler
 
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
protected CurrentAnnotationListingAction(ContentContainer contentPane)
           
protected CurrentAnnotationListingAction(ContentContainer contentPane, java.lang.String filename)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  void configureActionOnEnter()
          Sets the NAME and SHORT_DESCRIPTION (tooltip text) properties of this action as follows: NAME: filter.getDescription() + " in " + provider.getDescription() SHORT_DESCRIPTION: "Open annotation listing displaying " + filter.getDescription () + " in " provider.getDescription ()
 java.lang.String getActionText()
          Returns the verb that should be used to describe the action taken by this Action.
protected abstract  NotationListingAction getNotationListingAction()
           
 
Methods inherited from class eTextReader.actions.CurrentAnnotationAction
getCurrentNotation, isEnabledForType, notationEntered, notationExited, notationSelected
 
Methods inherited from class eTextReader.actions.BaseAction
getAcceleratorKeyStrokeFromPreferences, getInstance, propertyChange
 
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

CurrentAnnotationListingAction

protected CurrentAnnotationListingAction(ContentContainer contentPane)

CurrentAnnotationListingAction

protected CurrentAnnotationListingAction(ContentContainer contentPane,
                                         java.lang.String filename)
Method Detail

actionPerformed

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

getNotationListingAction

protected abstract NotationListingAction getNotationListingAction()

configureActionOnEnter

protected void configureActionOnEnter()
Sets the NAME and SHORT_DESCRIPTION (tooltip text) properties of this action as follows:

Overrides:
configureActionOnEnter in class CurrentAnnotationAction

getActionText

public java.lang.String getActionText()
Description copied from class: CurrentAnnotationAction
Returns the verb that should be used to describe the action taken by this Action. The verb is used to set the Action property appropriately as the current annotation changes

Specified by:
getActionText in class CurrentAnnotationAction
Returns: