SHOW Signed
 

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

java.lang.Object
  |
  +--net.rim.device.api.browser.field.BrowserContentBaseImpl
All Implemented Interfaces:
BrowserContent

public class BrowserContentBaseImpl
extends Object
implements BrowserContent

Field in which internet resource content (URLs) can be rendered.

Applications wishing to use browser fields to render web content should retrieve them from a rendering session (by invoking RenderingSession.getBrowserContent) rather than directly instantiating them.

When a browser content gets created it won't actually render any of its associated content until you invoke finishLoading().

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:
JDE 4.0.0

Field Summary
 Category: Signed protected  String _baseUrl
          Browser Base URL.
 Category: Signed protected  BrowserPageContext _context
          The browser page context object.
 Category: Signed protected  String _error
          Any error incurred when attempting to retrieve content for this content (HTTP response values lower than 200 or greater than 400).
 Category: Signed protected  int _flags
          The flags for the requests.
 Category: Signed protected  EncodedImage _icon
          Image to be displayed in the title.
 Category: Signed protected  String _iconUrl
          URL of image displayed in the title; used for bookmarks.
 Category: Signed protected  RenderingApplication _renderingApplication
          Application that uses this content.
 Category: Signed protected  RenderingOptions _renderingOptions
          Rendering options.
 Category: Signed protected  String _title
          Browser field title.
 Category: Signed protected  String _url
          Browser Field URL.
 
Constructor Summary
 Category: Signed BrowserContentBaseImpl(String url, Field content, RenderingApplication renderingApplication, RenderingOptions renderingOptions, int flags)
          Constructs a new BrowserContent instance.
 
Method Summary
 Category: Signed  void finishLoading()
          Complete loading by rendering content.
 Category: Signed  BrowserPageContext getBrowserPageContext()
          Retrieves page context for this browser content.
 Category: Signed  Field getDisplayableContent()
          Returns the displayable UI content field that this class was constructed with.
 Category: Signed  String getError()
          Retrieves error (if any) received when requesting content URL.
 Category: Signed  EncodedImage getIcon()
          Retrieves the title icon for this content.
 Category: Signed  String getIconUrl()
          Retrieves the URL of the title icon.
 Category: Signed  RenderingApplication getRenderingApplication()
          Retrieves handle to this content's rendering application.
 Category: Signed  int getRenderingFlags()
          Returns the rendering flags for this content.
 Category: Signed  RenderingOptions getRenderingOptions()
          Retrieves handle to this content's rendering options.
 Category: Signed  int getSharedFlags()
          Returns the shared rendering flags for this content.
 Category: Signed  String getTitle()
          Retrieves this content's title.
 Category: Signed  String getURL()
          Retrieves the URL for this content.
 Category: Signed  String resolveUrl(String relative)
          Resolves provided relative URL.
 Category: Signed  void resourceReady(RequestedResource resource)
          Indicates resource is ready to render.
 Category: Signed  void setBaseUrl(String url)
          Set the base url for relative url resolving.
 Category: Signed  void setBrowserPageContext(BrowserPageContext context)
          Sets page context for this browser content.
 Category: Signed  void setContent(Field field)
          Sets the content's displayable UI field.
 Category: Signed  void setError(String string)
          Indicates to the browser content class that some type of error has occurred.
 Category: Signed  void setIcon(EncodedImage icon)
          Sets title icon for this content.
 Category: Signed  void setIconUrl(String iconUrl)
          Sets the URL of title icon.
 Category: Signed  void setTitle(String title)
          Sets the content's title.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_baseUrl

protected String _baseUrl
Browser Base URL.
Since:
JDE 4.1.0
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.

_context

protected BrowserPageContext _context
The browser page context object. Rendering styles can be retrieved through this object.
Since:
JDE 4.0.0
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.

_error

protected String _error
Any error incurred when attempting to retrieve content for this content (HTTP response values lower than 200 or greater than 400).
Since:
JDE 4.0.0
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.

_flags

protected int _flags
The flags for the requests.
Since:
JDE 4.0.0
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.

_icon

protected EncodedImage _icon
Image to be displayed in the title.
Since:
JDE 4.0.0
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.

_iconUrl

protected String _iconUrl
URL of image displayed in the title; used for bookmarks.
Since:
JDE 4.2.0
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.

_renderingApplication

protected RenderingApplication _renderingApplication
Application that uses this content.
Since:
JDE 4.0.0
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.

_renderingOptions

protected RenderingOptions _renderingOptions
Rendering options.
Since:
JDE 4.0.0
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.

_title

protected String _title
Browser field title.
Since:
JDE 4.0.0
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.

_url

protected String _url
Browser Field URL.
Since:
JDE 4.0.0
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.
Constructor Detail

BrowserContentBaseImpl

public BrowserContentBaseImpl(String url,
                              Field content,
                              RenderingApplication renderingApplication,
                              RenderingOptions renderingOptions,
                              int flags)
                       throws IllegalArgumentException
Constructs a new BrowserContent instance.
Parameters:
url - Url for this content.
content - Displayable field for this browser content.
renderingApplication - Application that uses this content.
renderingOptions - Options the rendering application uses to render this content; may not be null.
flags - Rendering flags.
Throws:
IllegalArgumentException - If you provide null for the rendering options parameter.
Since:
JDE 4.0.0
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.
Method Detail

finishLoading

public void finishLoading()
                   throws RenderingException
Complete loading by rendering content.

A content object may do incremental rendering inside of this method. That is an application can call getDisplayableContent first and display the field to the user; and then call finishLoading on a background thread to actually display content to the user. This method must not be invoked on a UI Event Dispatch Thread.

Throws:
RenderingException - If this browser content was unable to render its content resource.
Since:
JDE 4.0.0
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.

getBrowserPageContext

public BrowserPageContext getBrowserPageContext()
Retrieves page context for this browser content.

Third parties can overwrite this method to direct the way the rendering library displays this content within the browser application.

Returns:
Null (third parties that implement their own browser contents can return a browser page context object, if they require special handling).
Since:
JDE 4.0.0
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.

getDisplayableContent

public final Field getDisplayableContent()
Returns the displayable UI content field that this class was constructed with.
Returns:
Returns the content.
Since:
JDE 4.0.0
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.

getError

public String getError()
Retrieves error (if any) received when requesting content URL.
Returns:
Error received when attempting to fetch resource content at URL.
Since:
JDE 4.0.0
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.

getIcon

public EncodedImage getIcon()
Retrieves the title icon for this content.
Returns:
image
Since:
JDE 4.0.0
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.

getIconUrl

public String getIconUrl()
Retrieves the URL of the title icon.
Returns:
URL of icon.
Since:
JDE 4.2.0
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.

getRenderingApplication

public RenderingApplication getRenderingApplication()
Retrieves handle to this content's rendering application.
Returns:
This content's rendering application.
Since:
JDE 4.0.0
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.

getRenderingFlags

public int getRenderingFlags()
Returns the rendering flags for this content.

Rendering flags can be found in the RenderingConstants class. The flags are composed by ORing together the constants in the referenced class.

Returns:
Retrieves rendering flags for this content.
Since:
JDE 4.0.0
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.

getRenderingOptions

public RenderingOptions getRenderingOptions()
Retrieves handle to this content's rendering options.
Returns:
This content's rendering options.
Since:
JDE 4.0.0
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.

getSharedFlags

public final int getSharedFlags()
Returns the shared rendering flags for this content.

The shared rendering flags can be found in the RenderingConstants class. Shared flags are those flags that will be used for subsequent requests.

Returns:
Retrieves the flags that are to be shared between this browser content and subsequent requests from it.
Since:
JDE 4.0.0
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.

getTitle

public String getTitle()
Retrieves this content's title.
Returns:
This content's title.
Since:
JDE 4.0.0
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.

getURL

public String getURL()
Retrieves the URL for this content.
Returns:
URL for this content.
Since:
JDE 4.0.0
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.

resolveUrl

public String resolveUrl(String relative)
Resolves provided relative URL.

Use this method to expand a relative URL and retrieve its canonical form. Browser Fields that want to manage relative urls, should overwrite this method. If the base url is set on this browser content then it will be used first for the resolving; if it is not set then the browser content's url will be used.

Parameters:
relative - URL to resolve.
Returns:
Canonical form of provided URL.
Since:
JDE 4.0.0
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.

resourceReady

public void resourceReady(RequestedResource resource)
Indicates resource is ready to render.

The rendering application invokes this call-back method after the resource is requested and the HTTP Connection is ready.

Parameters:
resource - Resource that was requested, which the HTTP connection set.
Since:
JDE 4.0.0
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.

setBaseUrl

public void setBaseUrl(String url)
Set the base url for relative url resolving.
Parameters:
url - The url to be used to resolve.
Since:
JDE 4.1.0
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.

setBrowserPageContext

public void setBrowserPageContext(BrowserPageContext context)
Sets page context for this browser content.

Third parties can provide their own implementation of the context to direct the way the rendering library displays this content with the browser application.

Parameters:
context - The page context to be set.
Since:
JDE 4.0.0
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.

setContent

public void setContent(Field field)
Sets the content's displayable UI field.
Parameters:
field - The displayable field to be set.
Since:
JDE 4.0.0
See Also:
getDisplayableContent
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.

setError

public void setError(String string)
Indicates to the browser content class that some type of error has occurred. The implementation may display this error string to the user.
Parameters:
string - Error string.
Since:
JDE 4.0.0
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.

setIcon

public void setIcon(EncodedImage icon)
Sets title icon for this content.
Parameters:
icon - image to be used
Since:
JDE 4.0.0
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.

setIconUrl

public void setIconUrl(String iconUrl)
Sets the URL of title icon.
Parameters:
iconUrl - URL to be used
Since:
JDE 4.2.0
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.

setTitle

public void setTitle(String title)
Sets the content's title. If the title is null or its length is 0 the title will not be set.
Parameters:
title - Title to be set.
Since:
JDE 4.0.0
See Also:
getTitle
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.



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.