eTextReader.actions
Class CurrentHighlightAnnotationAction
java.lang.Object
javax.swing.AbstractAction
eTextReader.actions.BaseAction
eTextReader.actions.CurrentAnnotationAction
eTextReader.actions.CurrentAnnotationListingAction
eTextReader.actions.CurrentHighlightAnnotationAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class CurrentHighlightAnnotationAction
- extends CurrentAnnotationListingAction
Provides an annotation listing action that will load all highlights of the same type as the current annotation
- 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 |
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 |
contentPane
protected ContentPane contentPane
highlightAction
protected HighlightTypeNotationAction highlightAction
CurrentHighlightAnnotationAction
protected CurrentHighlightAnnotationAction(ContentContainer contentPane)
- Parameters:
contentPane
-
CurrentHighlightAnnotationAction
protected CurrentHighlightAnnotationAction(ContentContainer contentPane,
java.lang.String filename)
- Parameters:
contentPane
- filename
-
isEnabledForType
protected boolean isEnabledForType(Notation.AnnotationType type)
- Ensures that this action is only enabled for highlights
- Overrides:
isEnabledForType
in class CurrentAnnotationAction
- Parameters:
type
- the type of annotation in question
- Returns:
- true if this action should be enabled for this annotation, false otherwise
notationEntered
protected void notationEntered(NotationEvent ne)
- Description copied from class:
CurrentAnnotationAction
- Called when a notation is entered. Sub-classes can override this method
to perform custom handling whenever the current annotation is changed.
This default implementation does nothing. This method should not
be used to change the displayed text/tooltip text of the action, since it is called
BEFORE configureActionOnEnter. Use that method to change the display
properties of the action.
- Overrides:
notationEntered
in class CurrentAnnotationAction
- Parameters:
ne
- the NotationEvent representing the entering of the notation- See Also:
CurrentAnnotationAction.configureActionOnEnter()
getNotationListingAction
protected NotationListingAction getNotationListingAction()
- Specified by:
getNotationListingAction
in class CurrentAnnotationListingAction
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
- Overrides:
getActionText
in class CurrentAnnotationListingAction
- Returns: