eTextReader
Class Browser.LocationChangeListener

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

 class Browser.LocationChangeListener
extends java.lang.Object
implements NotationEventListener


Field Summary
private  int location
          where on the page the desired point should be located.
private  int mode
          the type of scrolling this object should perform when notified
private  java.lang.String name
           
static int PAGE_BOTTOM
           
static int PAGE_TOP
           
private  java.lang.Object parameter
          further information about the scroll request
private  java.lang.String url
          the url this listener applies to.
 
Constructor Summary
Browser.LocationChangeListener(java.lang.String url, int mode, java.lang.Object parameter, int location, java.lang.String name)
          constructs a new page scroll listener
 
Method Summary
 void errorOccurred(NotationEvent errorEvent)
          Process an error that occured in the pane.
 void notationEventOccurred(NotationEvent noteEvent)
          Process a Notation event.
 void pageChanged(NotationEvent pageEvent)
          handle the callback when the page is changed by scrolling to the requested location in the document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_TOP

public static final int PAGE_TOP
See Also:
Constant Field Values

PAGE_BOTTOM

public static final int PAGE_BOTTOM
See Also:
Constant Field Values

url

private java.lang.String url
the url this listener applies to. If a page change event for a page other than this is received, the action of this listener is cancelled, on the assumption that the user has navigated elsewhere before the page load that created this listener was complete


mode

private int mode
the type of scrolling this object should perform when notified


parameter

private java.lang.Object parameter
further information about the scroll request


location

private int location
where on the page the desired point should be located. Either PAGE_TOP or PAGE_BOTTOM


name

private java.lang.String name
Constructor Detail

Browser.LocationChangeListener

public Browser.LocationChangeListener(java.lang.String url,
                                      int mode,
                                      java.lang.Object parameter,
                                      int location,
                                      java.lang.String name)
constructs a new page scroll listener

Parameters:
url - the url this listener applies to
mode - the type of scrolling this object should perform
parameter - further information about the scroll request
Method Detail

pageChanged

public void pageChanged(NotationEvent pageEvent)
handle the callback when the page is changed by scrolling to the requested location in the document

Specified by:
pageChanged in interface NotationEventListener
Parameters:
pageEvent - the event sent by the ContentPane object

notationEventOccurred

public void notationEventOccurred(NotationEvent noteEvent)
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

errorOccurred

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

Specified by:
errorOccurred in interface NotationEventListener