com.pepper.guiutils.browser
Interface PepperHistoryListener

All Known Implementing Classes:
BaseHistoryListener

public interface PepperHistoryListener

Interface implemented by classes interested in history events from the browser implementation.


Method Summary
 void addEntry(PepperHistoryEvent event)
          Notify a listener when a new document is added to the history.
 boolean goBack(PepperHistoryEvent event)
          Notify a listener when the browser attempts to go back one page in its history, usually because the user pressed the 'back' button.
 boolean goForward(PepperHistoryEvent event)
          Notify a listener when the browser attempts to go forward one page in its history, usually because the user pressed the 'forward' button.
 boolean goToIndex(PepperHistoryEvent event)
          Notify a listener when the browser attempts to visit an arbitrary page in the history, usually because the user chose that page to load from a popup or other menu.
 boolean purge(PepperHistoryEvent event)
          called to notify a listener when documents are removed from session history.
 boolean reload(PepperHistoryEvent event)
          Notify a listener when the browser attempts to reload the current page, usually because the user clicked the 'reload' button.
 

Method Detail

addEntry

void addEntry(PepperHistoryEvent event)
Notify a listener when a new document is added to the history. Not called when reloading or returning to a page that's already in the history.


goBack

boolean goBack(PepperHistoryEvent event)
Notify a listener when the browser attempts to go back one page in its history, usually because the user pressed the 'back' button.

Returns:
A boolean flag returned by the listener to indicate if the back operation is to be aborted or continued. If the listener returns true, it indicates that the back operation can be continued else back operation will be aborted. This is a mechanism for the listener to control user's operations with history.

goForward

boolean goForward(PepperHistoryEvent event)
Notify a listener when the browser attempts to go forward one page in its history, usually because the user pressed the 'forward' button.

Returns:
A boolean flag returned by the listener to indicate if the forward operation is to be aborted or continued. If the listener returns true, it indicates that the forward operation can be continued else forward operation will be aborted. This is a mechanism for the listener to control user's operations with history.

reload

boolean reload(PepperHistoryEvent event)
Notify a listener when the browser attempts to reload the current page, usually because the user clicked the 'reload' button.

Returns:
A boolean flag returned by the listener to indicate if the reload operation is to be aborted or continued. If the listener returns true, it indicates that the reload operation can be continued else reload operation will be aborted. This is a mechanism for the listener to control user's operations with history.

goToIndex

boolean goToIndex(PepperHistoryEvent event)
Notify a listener when the browser attempts to visit an arbitrary page in the history, usually because the user chose that page to load from a popup or other menu. For this event the HistoryEvent's index value contains the index in the history of the document to be loaded.

Returns:
A boolean flag returned by the listener to indicate if the GotoIndex operation is to be aborted or continued. If the listener returns true, it indicates that the GotoIndex operation can be continued else GotoIndex operation will be aborted. This is a mechanism for the listener to control user's operations with history.

purge

boolean purge(PepperHistoryEvent event)
called to notify a listener when documents are removed from session history. Documents can be removed from session history for various reasons. For example to control the memory usage of the browser, to prevent users from loading documents from history, to erase evidence of prior page loads etc... For this event the HistoryEvent's getEventParam will return IntegerEventParam instance with 'int' data containing number of documents to be removed from session history.

Returns:
A boolean flag returned by the listener to indicate if the purge operation is to be aborted or continued. If the listener returns true, it indicates that the purge operation can be continued else purge operation will be aborted. This is a mechanism for the listener to control user's operations with history. Note:- While purging history, the older documents are removed and newly loaded documents are kept. For example if there are 5 documents in history, and purge is called with 3 entries to be removed, then document 1, 2 and 3 are removed from history and most recently loaded document 4 and 5 are kept.


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