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
Base implementation of a browser container capable of rendering web content.
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 BrowserContentBaseImpl.finishLoading().
- See Also:
BrowserContent- 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
_icon
protected EncodedImage _icon
- Image or favicon associated with the content.
- 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
_iconUrl
protected String _iconUrl
- URL of icon image or favicon associated with the content.
- 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
_renderingApplication
protected RenderingApplication _renderingApplication
- Rendering application displaying this content.
- 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
_renderingOptions
protected RenderingOptions _renderingOptions
- Rendering options.
- 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
_url
protected String _url
- URL of the content.
- 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
_baseUrl
protected String _baseUrl
- Base URL used for resolving relative URLs.
- 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
_title
protected String _title
- Content title.
- 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
_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).
- 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
_flags
protected int _flags
- The rendering flags for the request.
- 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
_context
protected BrowserPageContext _context
- The browser page context object. Rendering styles can be retrieved through
this object.
- 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
_paramList
protected ObjectParamList _paramList
- The container holding all the information from the
param elements
of the object element that is rendered by this browser content.
- 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 5.0.0
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.- 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
setContent
public void setContent(Field field)
- Sets the content's displayable UI field.
- Parameters:
field - The displayable field for the content.- 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.
- Since:
- BlackBerry API 4.0.0
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 of the content.- 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.
- Since:
- BlackBerry API 4.0.0
setBaseUrl
public void setBaseUrl(String url)
- Set the base url for relative url resolving.
- Parameters:
url - The base url to be used when resolving relative URLs.- 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
getRenderingApplication
public RenderingApplication getRenderingApplication()
- Retrieves handle to this content's rendering application.
- Specified by:
getRenderingApplication in interface BrowserContent
- Returns:
- This content's rendering application.
- 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
getRenderingOptions
public RenderingOptions getRenderingOptions()
- Retrieves handle to this content's rendering options.
- Specified by:
getRenderingOptions in interface BrowserContent
- Returns:
- This content's rendering options.
- 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
getTitle
public String getTitle()
- Retrieves this content's title.
- Specified by:
getTitle in interface BrowserContent
- Returns:
- The title of this content.
- 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 the URL of this content.
- Specified by:
getURL in interface BrowserContent
- Returns:
- The URL of this content.
- 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
getError
public String getError()
- Retrieves error (if any) received when requesting the content.
- Specified by:
getError in interface BrowserContent
- Returns:
- Error received when attempting to fetch the content.
- 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
getIcon
public EncodedImage getIcon()
- Retrieves the icon for this content.
- Specified by:
getIcon in interface BrowserContent
- Returns:
- The image representation of the icon.
- 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
setIcon
public void setIcon(EncodedImage icon)
- Sets icon for this content.
- Parameters:
icon - Image represenation of the icon.- 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
getIconUrl
public String getIconUrl()
- Retrieves the URL of the icon for this content.
- Returns:
- The URL of the icon.
- 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
setIconUrl
public void setIconUrl(String iconUrl)
- Sets the URL of icon for this content.
- Parameters:
iconUrl - URL of the icon.- 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
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.
- Specified by:
getBrowserPageContext in interface BrowserContent
- Returns:
- Null (third parties that implement their own browser content can
return a browser page context object, if they require special handling).
- 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
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 for this content..- 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
getObjectParamList
public ObjectParamList getObjectParamList()
- Retrieves the
param element information for this
browser content.
- Returns:
- The container holding the information from all the
param elements. This may be null
if the browser content was not created for an object
element. - 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 5.0.0
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.
- Specified by:
resolveUrl in interface BrowserContent
- Parameters:
relative - The URL to resolve.
- Returns:
- Canonical form of provided 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
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.
- Specified by:
resourceReady in interface BrowserContent
- Parameters:
resource - Resource that was requested, which the HTTP connection set.- 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
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.
- Specified by:
finishLoading in interface BrowserContent
- Throws:
RenderingException - If this browser content was unable to render its content
resource.- 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
getDisplayableContent
public final Field getDisplayableContent()
- Returns the displayable UI content field that this instance was constructed with.
- Specified by:
getDisplayableContent in interface BrowserContent
- Returns:
- The displayable field for the content.
- 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
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:
- The flags that are to be shared between this browser content and
subsequent requests from it.
- 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
getRenderingFlags
public int getRenderingFlags()
- Retrieves 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.
- Specified by:
getRenderingFlags in interface BrowserContent
- Returns:
- The rendering flags for this content.
- 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
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.
- Specified by:
setError in interface BrowserContent
- Parameters:
string - Error string describing the error that occurred.- 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
getDOMDocument
public Document getDOMDocument()
- Retrieves the DOM Document representation of the content.
- Returns:
- The W3C Document Object Model Document that represents the
content rendered by this BrowserContent. This may be null if the content
does not have a corresponding DOM.
- 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 5.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.