eTextReader
Class Browser.NotationEventHandler

java.lang.Object
  extended by eTextReader.Browser.NotationEventHandler
All Implemented Interfaces:
NotationEventListener, java.util.EventListener
Enclosing class:
Browser

public class Browser.NotationEventHandler
extends java.lang.Object
implements NotationEventListener

This class handles the tasks that are specific to the browser only in regard to handling notation events. Popup handling has been moved to a separate class to facilitate re-use by other classes

Author:
mcfall

Constructor Summary
Browser.NotationEventHandler()
           
 
Method Summary
 void errorOccurred(NotationEvent ne)
          Process an error that occured in the pane.
private  void handleNotationSelected(NotationEvent ne)
           
private  void indexWebPage(java.lang.String url)
           
 void notationEventOccurred(NotationEvent ne)
          Process a Notation event.
private  boolean openLinkAnnotation(Notation notation, boolean openInNewTab)
          This method tries to open the page linked to by a specific annotation
 void pageChanged(NotationEvent ne)
          Process a page change event.
private  java.lang.String setMode(java.lang.String url, java.lang.String pageTitle)
           
private  void updateNavigationBar(java.lang.String url)
           
private  void updateReadingAssignmentDisplay(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Browser.NotationEventHandler

public Browser.NotationEventHandler()
Method Detail

notationEventOccurred

public void notationEventOccurred(NotationEvent ne)
Description copied from interface: NotationEventListener
Process a Notation event. This happens when a Notation is clicked on, or the cursor passes over an annotation.

Specified by:
notationEventOccurred in interface NotationEventListener

handleNotationSelected

private void handleNotationSelected(NotationEvent ne)

openLinkAnnotation

private boolean openLinkAnnotation(Notation notation,
                                   boolean openInNewTab)
This method tries to open the page linked to by a specific annotation

Parameters:
id - the id of the link annotation
openInNewTab -
Returns:
true if the link can be opened, false otherwise

errorOccurred

public void errorOccurred(NotationEvent ne)
Description copied from interface: NotationEventListener
Process an error that occured in the pane.

Specified by:
errorOccurred in interface NotationEventListener

pageChanged

public void pageChanged(NotationEvent ne)
Description copied from interface: NotationEventListener
Process a page change event.

Specified by:
pageChanged in interface NotationEventListener

updateNavigationBar

private void updateNavigationBar(java.lang.String url)

updateReadingAssignmentDisplay

private void updateReadingAssignmentDisplay(java.lang.String url)

indexWebPage

private void indexWebPage(java.lang.String url)

setMode

private java.lang.String setMode(java.lang.String url,
                                 java.lang.String pageTitle)