|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
eTextReader.actions.BaseAction
eTextReader.actions.NotationListingAction
public abstract class NotationListingAction
Provides the functionality allowing us to display an AnnotationListing. The actionPerformed method of this class constructs a NotationListing object to show the desired annotations. By default, all pages containing any type of annotation are shown. The methods getNotationProvider() and getNotationFilter() are used to construct the NotationListing object when the action is invoked, and allow sub-classes to specify an arbitrary set of pages to be included in the search for annotations, as well as a means to filter out which annotations on those pages are included. Notation providers or filters that require specialized configuration (such as interaction with the user or querying of a database) are supported through the configureProvider and configureFilter methods.
The action is configured using the results of the abstract getName() and getTooltipText methods, which are used for the Action.NAME and Action.SHORT_DESCRIPTION properties.
Since it descends from BaseAction, there is a single instance of these actions associated with a given ContentContainer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class eTextReader.actions.BaseAction |
---|
BaseAction.Key |
Field Summary | |
---|---|
protected ContentContainer |
container
|
protected NotationFilter |
filter
|
protected NotationProvider |
provider
|
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 |
NotationListingAction(ContentContainer container)
Constructs a NotationListingAction without an icon representation |
protected |
NotationListingAction(ContentContainer container,
java.lang.String fileName)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
protected void |
configureFilter()
Allows an action to interact with the user to configure the NotationFilter in some way. |
protected void |
configureProvider()
Allows an action to interact with the user to configure the NotationProvider in some way. |
protected abstract java.lang.String |
getName()
Returns the name associated with this action, displayed in menus, buttons, etc. |
protected NotationFilter |
getNotationFilter()
Returns the NotationFilter used to filter the set of annotations that are displayed by the NotationListing interface. |
protected NotationProvider |
getNotationProvider()
Returns the NotationProvider used to provide a set of pages to the NotationListing interface. |
protected abstract java.lang.String |
getTooltipText()
Returns the tooltip text associated with this action |
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 |
Field Detail |
---|
protected ContentContainer container
protected NotationProvider provider
protected NotationFilter filter
Constructor Detail |
---|
protected NotationListingAction(ContentContainer container)
protected NotationListingAction(ContentContainer container, java.lang.String fileName)
fileName
- Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
protected void configureProvider()
Allows an action to interact with the user to configure the NotationProvider in some way. For example, it might allow the user to select a set of book chapters to be included.
configureProvider is called by actionPerformed before the NotationListing object is constructed. The default implementation does nothing.
protected void configureFilter()
Allows an action to interact with the user to configure the NotationFilter in some way. For example, it might allow the user to specify a date range or select a subset of annotation types to be displayed
configureFilter is called by actionPerformed before the NotationListing object is constructed. The default implementation does nothing.
protected NotationProvider getNotationProvider()
protected NotationFilter getNotationFilter()
protected abstract java.lang.String getName()
protected abstract java.lang.String getTooltipText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |