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

java.lang.Object
  extended by net.rim.device.api.browser.field.Event
Direct Known Subclasses:
BrowserContentChangedEvent, CloseEvent, ContentReadEvent, ErrorEvent, ExecutingScriptEvent, FullWindowEvent, HistoryEvent, RedirectEvent, SetHeaderEvent, SetHttpCookieEvent, StopEvent, UrlRequestedEvent

public abstract class Event
extends Object

Defines general functionality for all browser events.

The various events supported by the browser are all subclasses of this event.

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 EVENT_BROWSER_CONTENT_CHANGED
          Field values changed due to refresh.
Category: Signed static int EVENT_CANCEL_REQUEST_RESOURCE
          Notifies rendering application that a previous call for a requested resource has been canceled.
Category: Signed static int EVENT_CLOSE
          Close browser tab event.
Category: Signed static int EVENT_ERROR_DISPLAY
          Notifies rendering application that an error message should be displayed to the user.
Category: Signed static int EVENT_EXECUTING_SCRIPT
          Notifies rendering application that script is being executed.
Category: Signed static int EVENT_FULL_WINDOW
          Show in full window.
Category: Signed static int EVENT_HISTORY
          Navigation back in history is requested.
Category: Signed static int EVENT_LONG_RUNNING_SCRIPT
          Notifies rendering application that a script has been running continuously for too long.
Category: Signed static int EVENT_REDIRECT
          Redirect event.
Category: Signed static int EVENT_SET_HEADER
          Set header event.
Category: Signed static int EVENT_SET_HTTP_COOKIE
          Set HTTP cookie event.
Category: Signed static int EVENT_STOP
          Stop event.
Category: Signed static int EVENT_TICK_CONTENT_READ
          Progress changed.
Category: Signed static int EVENT_UI_DIRECTION_REQUEST
          Notifies rendering application that the UI direction has been set; and to change the position of scrollbars if any.
Category: Signed static int EVENT_URL_REQUESTED
          URL requested.
Category: Signed static int PUBLIC_EVENT_THRESHOLD
           
 
Constructor Summary
Category: Signed Event(int uid, Object src)
          Creates a new Event instance.
 
Method Summary
Category: Signed  Object getSource()
          Retrieves the object that triggered this event.
Category: Signed  String getSourceURL()
          Extracts URL from the source object.
Category: Signed  int getUID()
          Retrieves the UID for this event.
Category: Signed protected  String resolveUrl(String url)
          Resolves provided URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

PUBLIC_EVENT_THRESHOLD

public static final int PUBLIC_EVENT_THRESHOLD
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

EVENT_BROWSER_CONTENT_CHANGED

public static final int EVENT_BROWSER_CONTENT_CHANGED
Field values changed due to refresh.

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

EVENT_CLOSE

public static final int EVENT_CLOSE
Close browser tab event.

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

EVENT_EXECUTING_SCRIPT

public static final int EVENT_EXECUTING_SCRIPT
Notifies rendering application that script is being executed.

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

EVENT_FULL_WINDOW

public static final int EVENT_FULL_WINDOW
Show in full window.

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

EVENT_HISTORY

public static final int EVENT_HISTORY
Navigation back in history is requested.

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

EVENT_REDIRECT

public static final int EVENT_REDIRECT
Redirect event.

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

EVENT_SET_HEADER

public static final int EVENT_SET_HEADER
Set header event.

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

EVENT_SET_HTTP_COOKIE

public static final int EVENT_SET_HTTP_COOKIE
Set HTTP cookie event. This event is only triggered when JavaScript on a page sets a cookie, not when a cookie is set by a web server.

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

EVENT_STOP

public static final int EVENT_STOP
Stop event.

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

EVENT_URL_REQUESTED

public static final int EVENT_URL_REQUESTED
URL requested.

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

EVENT_TICK_CONTENT_READ

public static final int EVENT_TICK_CONTENT_READ
Progress changed.

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.2

EVENT_UI_DIRECTION_REQUEST

public static final int EVENT_UI_DIRECTION_REQUEST
Notifies rendering application that the UI direction has been set; and to change the position of scrollbars if any.

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.1.0

EVENT_ERROR_DISPLAY

public static final int EVENT_ERROR_DISPLAY
Notifies rendering application that an error message should be displayed to the user.

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.1.0

EVENT_CANCEL_REQUEST_RESOURCE

public static final int EVENT_CANCEL_REQUEST_RESOURCE
Notifies rendering application that a previous call for a requested resource has been canceled.

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.2.0

EVENT_LONG_RUNNING_SCRIPT

public static final int EVENT_LONG_RUNNING_SCRIPT
Notifies rendering application that a script has been running continuously for too long. Unless the event is handled and Boolean.TRUE is returned, the script will be killed.

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 6.0.0


Constructor Detail

Event

public Event(int uid,
             Object src)
Creates a new Event instance.

Parameters:
uid - ID for this event (one of this class's EVENT_* data members).
src - Object that triggered this event (typically a BrowserContent object or an HttpConnection).
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

getSource

public final Object getSource()
Retrieves the object that triggered this event.

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

getSourceURL

public final String getSourceURL()
Extracts URL from the source object.

Returns:
URL associated with event source, if available.
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

getUID

public final int getUID()
Retrieves the UID for this event.

Returns:
This event's UID.
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

resolveUrl

protected String resolveUrl(String url)
Resolves provided URL. Provided a relative URL, this method returns a canonical (absolute) URL, using the the base provided by this event's source object.

Parameters:
url - URL to be resolved.
Returns:
Absolute 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





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.