eTextReader.actions
Class CurrentHighlightAnnotationAction

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

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
protected  ContentPane contentPane
           
protected  HighlightTypeNotationAction highlightAction
           
 
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 CurrentHighlightAnnotationAction(ContentContainer contentPane)
           
protected CurrentHighlightAnnotationAction(ContentContainer contentPane, java.lang.String filename)
           
 
Method Summary
 java.lang.String getActionText()
          Returns the verb that should be used to describe the action taken by this Action.
protected  NotationListingAction getNotationListingAction()
           
protected  boolean isEnabledForType(Notation.AnnotationType type)
          Ensures that this action is only enabled for highlights
protected  void notationEntered(NotationEvent ne)
          Called when a notation is entered.
 
Methods inherited from class eTextReader.actions.CurrentAnnotationListingAction
actionPerformed, configureActionOnEnter
 
Methods inherited from class eTextReader.actions.CurrentAnnotationAction
getCurrentNotation, 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
 

Field Detail

contentPane

protected ContentPane contentPane

highlightAction

protected HighlightTypeNotationAction highlightAction
Constructor Detail

CurrentHighlightAnnotationAction

protected CurrentHighlightAnnotationAction(ContentContainer contentPane)
Parameters:
contentPane -

CurrentHighlightAnnotationAction

protected CurrentHighlightAnnotationAction(ContentContainer contentPane,
                                           java.lang.String filename)
Parameters:
contentPane -
filename -
Method Detail

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: