net.rim.device.api.browser.field
Class HistoryEvent

java.lang.Object
  extended by net.rim.device.api.browser.field.Event
      extended by net.rim.device.api.browser.field.HistoryEvent

public class HistoryEvent
extends Event

Event to interact with the browser field's history.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
Category: Signed static int TYPE_ADD_URL
          Event to add new URL to the history.
Category: Signed static int TYPE_NAVIGATION
          Event to navigate within the history.
Category: Signed static int TYPE_REMOVE_URL
          Event to remove URL from the history.
 
Fields inherited from class net.rim.device.api.browser.field.Event
EVENT_BROWSER_CONTENT_CHANGED, EVENT_CANCEL_REQUEST_RESOURCE, EVENT_CLOSE, EVENT_ERROR_DISPLAY, EVENT_EXECUTING_SCRIPT, EVENT_FULL_WINDOW, EVENT_HISTORY, EVENT_LONG_RUNNING_SCRIPT, EVENT_REDIRECT, EVENT_SET_HEADER, EVENT_SET_HTTP_COOKIE, EVENT_STOP, EVENT_TICK_CONTENT_READ, EVENT_UI_DIRECTION_REQUEST, EVENT_URL_REQUESTED, PUBLIC_EVENT_THRESHOLD
 
Constructor Summary
Category: Signed HistoryEvent(Object src, int index, boolean programmatic, int type)
          Constructs a new HistoryEvent instance for navigation.
Category: Signed HistoryEvent(Object src, String url, int type)
          Deprecated. Directly modifying the history can lead to very strange and unintuitive behavior as history management is precisely defined in the HTML5 specification. Therefore use of this event is not recommended.
 
Method Summary
Category: Signed  int getIndex()
          Retrieves offset for history navigation.
Category: Signed  int getType()
          Retrieves event type.
Category: Signed  String getURL()
          Retrieves URL for event.
Category: Signed  boolean isProgrammatic()
          Determines if event is programmatic.
 
Methods inherited from class net.rim.device.api.browser.field.Event
getSource, getSourceURL, getUID, resolveUrl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

TYPE_NAVIGATION

public static final int TYPE_NAVIGATION
Event to navigate within the history.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

TYPE_ADD_URL

public static final int TYPE_ADD_URL
Event to add new URL to the history.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

TYPE_REMOVE_URL

public static final int TYPE_REMOVE_URL
Event to remove URL from the history.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Constructor Detail

HistoryEvent

public HistoryEvent(Object src,
                    int index,
                    boolean programmatic,
                    int type)
Constructs a new HistoryEvent instance for navigation.

Parameters:
src - Source for this event.
index - History index value expressed as a distance from the "current" page (-1 indicates go back one page, +2 indicates go forward two pages).
programmatic - True to indicate this event is created as a result of a programmatic action; otherwise, false.
type - Type of history event; should be HistoryEvent.TYPE_NAVIGATION.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

HistoryEvent

public HistoryEvent(Object src,
                    String url,
                    int type)
Deprecated. Directly modifying the history can lead to very strange and unintuitive behavior as history management is precisely defined in the HTML5 specification. Therefore use of this event is not recommended.

Constructs a new HistoryEvent instance for adding/removing URLs.

This constructor assumes the event is created as a result of a programmatic action.

Parameters:
src - Source for this event.
url - URL to add to, or remove from, this history.
type - Type of history event; should be HistoryEvent.TYPE_ADD_URL or HistoryEvent.TYPE_REMOVE_URL.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Method Detail

getIndex

public int getIndex()
Retrieves offset for history navigation.

Returns:
Number of positions away from "current" page for navigation.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

isProgrammatic

public boolean isProgrammatic()
Determines if event is programmatic.

Returns:
If true, event is created as a result of programmatic action; otherwise, false.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getType

public int getType()
Retrieves event type.

Returns:
One of HistoryEvent.TYPE_NAVIGATION, HistoryEvent.TYPE_ADD_URL, or HistoryEvent.TYPE_REMOVE_URL.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getURL

public String getURL()
Retrieves URL for event.

Returns:
URL to add to, or remove from, history.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.