eTextReader.actions
Class PreviousPageAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by eTextReader.actions.BaseAction
          extended by eTextReader.actions.BrowserAction
              extended by eTextReader.actions.PreviousPageAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class PreviousPageAction
extends BrowserAction

Causes the browser to navigate to the previous page in the current textbook, or the previous page in the web browsing history, depending on the current mode of the book

Author:
mcfall
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class eTextReader.actions.BaseAction
BaseAction.Key
 
Field Summary
static java.lang.String PREVIOUS_CHAPTER
           
static java.lang.String WEB_BACK
           
 
Fields inherited from class eTextReader.actions.BrowserAction
browser
 
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
PreviousPageAction(ContentContainer container)
          Constructs a PreviousPageAction instance associated with the given container with no icon
PreviousPageAction(ContentContainer container, java.lang.String fileName)
          Constructs a PreviousPageAction instance associated with the given container and having the given icon
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
protected  javax.swing.KeyStroke getAcceleratorKeyStrokeFromPreferences()
          Returns the KeyStroke associated with this action from the user's application preferences.
 
Methods inherited from class eTextReader.actions.BaseAction
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

PREVIOUS_CHAPTER

public static final java.lang.String PREVIOUS_CHAPTER
See Also:
Constant Field Values

WEB_BACK

public static final java.lang.String WEB_BACK
See Also:
Constant Field Values
Constructor Detail

PreviousPageAction

public PreviousPageAction(ContentContainer container)
Constructs a PreviousPageAction instance associated with the given container with no icon

Parameters:
container - a ContentContainer object associated with this action. As per the BrowserAction contract, this object must be a Browser, or a runtime exception will be thrown

PreviousPageAction

public PreviousPageAction(ContentContainer container,
                          java.lang.String fileName)
Constructs a PreviousPageAction instance associated with the given container and having the given icon

Parameters:
container - a ContentContainer object associated with this action. As per the BrowserAction contract, this object must be a Browser, or a runtime exception will be thrown
fileName - the path to an image file containing the icon for this action, or null if no image is to be used
Method Detail

actionPerformed

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

getAcceleratorKeyStrokeFromPreferences

protected javax.swing.KeyStroke getAcceleratorKeyStrokeFromPreferences()
Description copied from class: BaseAction
Returns the KeyStroke associated with this action from the user's application preferences. The default implementation here returns null. Any action that wants to associate an accelerator with its action that will be maintained by the ApplicationPreferences class should override this method to load the KeyStroke from the user's application preferences

Overrides:
getAcceleratorKeyStrokeFromPreferences in class BaseAction
Returns: