eTextReader.actions
Class CurrentAnnotationListingAction
java.lang.Object
javax.swing.AbstractAction
eTextReader.actions.BaseAction
eTextReader.actions.CurrentAnnotationAction
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:
- a sub-class A of NotationListingAction that provides a
notation listing based on the desired annotation attribute, and provides a method for the filter value to be changed
-
a CurrentAnnotationListingAction sub-class that constructs an instance of the class notationEntered method.
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
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 |
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 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 |
CurrentAnnotationListingAction
protected CurrentAnnotationListingAction(ContentContainer contentPane)
CurrentAnnotationListingAction
protected CurrentAnnotationListingAction(ContentContainer contentPane,
java.lang.String filename)
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:
- NAME: filter.getDescription() + " in " + provider.getDescription()
- SHORT_DESCRIPTION: "Open annotation listing displaying " + filter.getDescription () + " in " provider.getDescription ()
- 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: