com.pepper.guiutils.browser
Class PepperHistoryEvent

java.lang.Object
  extended by com.pepper.guiutils.browser.BrowserEvent
      extended by com.pepper.guiutils.browser.PepperHistoryEvent

public class PepperHistoryEvent
extends BrowserEvent

Notification of a history event.


Field Summary
static int INVALID_INDEX
           
 
Constructor Summary
PepperHistoryEvent(String viewID, int eventType, String url)
          Constructor
PepperHistoryEvent(String viewID, int eventType, String url, int index)
          Constructor used for creating "go to index" history events.
 
Method Summary
 int getEventType()
          Returns the type of the event
 int getIndex()
          Returns the history index of the url that was loaded.
 String getURL()
          Returns the URL that was loaded
 String toString()
           
 
Methods inherited from class com.pepper.guiutils.browser.BrowserEvent
getEventParam, getViewID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID_INDEX

public static int INVALID_INDEX
Constructor Detail

PepperHistoryEvent

public PepperHistoryEvent(String viewID,
                          int eventType,
                          String url,
                          int index)
Constructor used for creating "go to index" history events. For all other events, use the 3-arg constructor or pass INVALID_INDEX as the index.

Parameters:
viewID - ID of the WebBrowserView that generated the event
eventType - type of the event. Must be one of the HIS_* constants from org.mozilla.jrex.event.history.HistoryEventConstants
url - URL of the page that was loaded
index - Index of the page in the history

PepperHistoryEvent

public PepperHistoryEvent(String viewID,
                          int eventType,
                          String url)
Constructor

Parameters:
viewID - ID of the WebBrowserView that generated the event
eventType - type of the event. Must be one of the HIS_* constants from org.mozilla.jrex.event.history.HistoryEventConstants
url - The url associated with the event
Method Detail

getEventType

public int getEventType()
Returns the type of the event

Overrides:
getEventType in class BrowserEvent
Returns:
one of the HIS_* constants from org.mozilla.jrex.event.history.HistoryEventConstants

getURL

public String getURL()
Returns the URL that was loaded

Returns:
URL that was loaded

getIndex

public int getIndex()
Returns the history index of the url that was loaded. Only valid for "go to index" history events and "purge events" (where the index will represent the number of entries to purge from History)

Returns:
index into the history of the page that was loaded, or INVALID_INDEX.

toString

public String toString()
Overrides:
toString in class BrowserEvent
See Also:
Object


Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.