net.rim.device.api.browser.field2
Class BrowserFieldHistory

java.lang.Object
  extended by net.rim.device.api.browser.field2.BrowserFieldHistory

public final class BrowserFieldHistory
extends Object

This class provides history related functionality for a single BrowserField instance.

Since:
BlackBerry API 5.0.0

Method Summary
 boolean canGoBack()
          This method returns true iff there are pages backwards in the history
 boolean canGoForward()
          This method returns true iff there are pages forwards in the history
 void clearHistory()
          This method will clear the current BrowserField instance's history
 void go(int distance)
          This method will find the page a certain distance forward or backwards from the current page and load that pages
 void goBack()
          This method will find the previous page loaded into this BrowserField instance and reload it
 void goForward()
          This method will find the next page in this BrowserField instance's history and reload it
 void refresh()
          This method will reload the current page in this BrowserField instance's history
 void updateHistory(String url)
          This method will update the BrowserField instance's history to incorporate the provided url as the new current url
 void updateHistory(String url, boolean isRedirect)
          This method will update the BrowserField instance's history to incorporate the provided url as the new current url
while removing the previous url added to the history (presumably the url that redirected to this new one)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

goBack

public void goBack()
This method will find the previous page loaded into this BrowserField instance and reload it

Since:
BlackBerry API 5.0.0

goForward

public void goForward()
This method will find the next page in this BrowserField instance's history and reload it

Since:
BlackBerry API 5.0.0

go

public void go(int distance)
This method will find the page a certain distance forward or backwards from the current page and load that pages

Parameters:
distance - The distance to look backwards (negative number) or forwards (positive number) in the history
Since:
BlackBerry API 5.0.0

refresh

public void refresh()
This method will reload the current page in this BrowserField instance's history

Since:
BlackBerry API 5.0.0

canGoBack

public boolean canGoBack()
This method returns true iff there are pages backwards in the history

Returns:
true if a previous page exists, false otherwise
Since:
BlackBerry API 5.0.0

canGoForward

public boolean canGoForward()
This method returns true iff there are pages forwards in the history

Returns:
true if a next page exists, false otherwise
Since:
BlackBerry API 5.0.0

clearHistory

public void clearHistory()
This method will clear the current BrowserField instance's history

Since:
BlackBerry API 5.0.0

updateHistory

public void updateHistory(String url)
This method will update the BrowserField instance's history to incorporate the provided url as the new current url

Since:
BlackBerry API 5.0.0

updateHistory

public void updateHistory(String url,
                          boolean isRedirect)
This method will update the BrowserField instance's history to incorporate the provided url as the new current url
while removing the previous url added to the history (presumably the url that redirected to this new one)

Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal