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

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

public class BrowserFieldConfig
extends Object

This class provides a means to configure a BrowserField instance. This can be done as follows:

     BrowserFieldConfig config = new BrowserFieldConfig();
     config.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");
     BrowserField browserField = new BrowserField(config);
 

Since:
BlackBerry API 5.0.0

Field Summary
static String ALLOW_CS_XHR
          Property Type: Boolean
Default: Boolean.FALSE

static String CONNECTION_FACTORY
          Use this property overwrite the default transport connection factory used by the default connection manager to selected which transport to use when opening a connection.
static String CONNECTION_MANAGER
          Property Type: BrowserFieldConnectionManager
Default: Use internal connection management that will find the best available transport service
and use that service to open connections.
static String CONTROLLER
          Property Type: BrowserFieldController
Default: ProtocolController

static String COOKIE_MANAGER
          Property Type: BrowserFieldCookieManager
Default: Use internal cookie management that is similar in behaviour to the Browser

static String DISABLE_AUTO_FOCUS
          When set to true, BF2 will not grab focus automatically
static String ENABLE_COOKIES
          Dictates whether or not cookies are enabled.
static String ENABLE_GEARS
          Deprecated. Gears will be replaced by HTML5 equivalent features
static String ENABLE_WEB_INSPECTOR
          Dictates whether web inspector is enabled, make page inspectable.
static String ERROR_HANDLER
          Property Type: BrowserFieldErrorHandler
Default: BrowserFieldErrorHandler

static String HTTP_HEADERS
          If specified, these HTTP headers will replace the default headers to be used when making HTTP requests.
static String INITIAL_SCALE
          Property Type: Float
Default: None

static String JAVASCRIPT_ENABLED
          Property Type: Boolean
Default: Boolean.TRUE

static String JAVASCRIPT_TIMEOUT
          Property Type: Integer
Default: 5000 (5 seconds)

static String MDS_TRANSCODING_ENABLED
          Deprecated. MDS transcoding is not supported
static String NAVIGATION_MODE
          This property determines the navigation type.
static Integer NAVIGATION_MODE_CARET
          Deprecated. Caret navigation mode is no longer supported. When used it is interpreted as equivalent to NAVIGATION_MODE_NODE
static Integer NAVIGATION_MODE_NODE
          This is one of the four options for the NAVIGATION_MODE property.
static Integer NAVIGATION_MODE_NONE
          This is one of the four options for the NAVIGATION_MODE property.
static Integer NAVIGATION_MODE_POINTER
          This is one of the four options for the NAVIGATION_MODE property.
static String USER_AGENT
          Property Type: String
Default: The BlackBerry Browser's user agent.
static String USER_SCALABLE
          Property Type: Boolean
Default: Boolean.TRUE

static String VIEWPORT_WIDTH
          Property Type: Integer
Default: None
 
Constructor Summary
BrowserFieldConfig()
          This method creates a new instance of BrowserFieldConfig with no properties set.
 
Method Summary
 Object getProperty(String key)
          This method retrieves a config property
 boolean propertyExists(String key)
          This checks for the existence of a config property
 void setProperty(String key, Object value)
          This method sets a config property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

HTTP_HEADERS

public static final String HTTP_HEADERS
If specified, these HTTP headers will replace the default headers to be used when making HTTP requests.
Property Type: net.rim.device.api.io.http.HttpHeaders

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

USER_AGENT

public static final String USER_AGENT
Property Type: String
Default: The BlackBerry Browser's user agent.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ENABLE_WEB_INSPECTOR

public static final String ENABLE_WEB_INSPECTOR
Dictates whether web inspector is enabled, make page inspectable.
Property Type: Boolean
Default: Boolean.FALSE

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0

ENABLE_COOKIES

public static final String ENABLE_COOKIES
Dictates whether or not cookies are enabled.
Property Type: Boolean
Default: Boolean.TRUE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

COOKIE_MANAGER

public static final String COOKIE_MANAGER
Property Type: BrowserFieldCookieManager
Default: Use internal cookie management that is similar in behaviour to the Browser

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

CONTROLLER

public static final String CONTROLLER
Property Type: BrowserFieldController
Default: ProtocolController

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

CONNECTION_MANAGER

public static final String CONNECTION_MANAGER
Property Type: BrowserFieldConnectionManager
Default: Use internal connection management that will find the best available transport service
and use that service to open connections.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ERROR_HANDLER

public static final String ERROR_HANDLER
Property Type: BrowserFieldErrorHandler
Default: BrowserFieldErrorHandler

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ALLOW_CS_XHR

public static final String ALLOW_CS_XHR
Property Type: Boolean
Default: Boolean.FALSE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

USER_SCALABLE

public static final String USER_SCALABLE
Property Type: Boolean
Default: Boolean.TRUE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

INITIAL_SCALE

public static final String INITIAL_SCALE
Property Type: Float
Default: None

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

VIEWPORT_WIDTH

public static final String VIEWPORT_WIDTH
Property Type: Integer
Default: None

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

JAVASCRIPT_ENABLED

public static final String JAVASCRIPT_ENABLED
Property Type: Boolean
Default: Boolean.TRUE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

JAVASCRIPT_TIMEOUT

public static final String JAVASCRIPT_TIMEOUT
Property Type: Integer
Default: 5000 (5 seconds)

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

NAVIGATION_MODE

public static final String NAVIGATION_MODE
This property determines the navigation type. The three modes are NAVIGATION_MODE_CARET, NAVIGATION_MODE_POINTER, NAVIGATION_MODE_NONE. When not specified, the method of navigation will be a
"character-to-character" cursor rather than a floating pointer.

Property Type: Integer
Default: NAVIGATION_MODE_CARET

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

MDS_TRANSCODING_ENABLED

public static final String MDS_TRANSCODING_ENABLED
Deprecated. MDS transcoding is not supported
This property dictates whether or not MDS will transcode web content when requests are being made through MDS.

Transcoding of content includes compilation of JavaScript, pre-parsing of HTML/CSS and transcoding of images.
Transcoding of content improves performance and is normally desirable.

This property is ignored when a BrowserFieldDebugger is set and transcoding is disabled.

Property Type: Boolean
Default: Boolean.TRUE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

ENABLE_GEARS

public static final String ENABLE_GEARS
Deprecated. Gears will be replaced by HTML5 equivalent features
Property Type: Boolean
Default: Boolean.FALSE

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

CONNECTION_FACTORY

public static final String CONNECTION_FACTORY
Use this property overwrite the default transport connection factory used by the default connection manager to selected which transport to use when opening a connection.

Property Type: ConnectionFactory
Default: A ConnectionFactory configured to use transports:
TRANSPORT_TCP_WIFI, TRANSPORT_MDS, TRANSPORT_BIS_B, TRANSPORT_CELLULAR, TRANSPORT_WAP2, TRANSPORT_WAP

See Also:
ConnectionFactory, Constant Field Values
Since:
BlackBerry API 5.0.0

NAVIGATION_MODE_NONE

public static final Integer NAVIGATION_MODE_NONE
This is one of the four options for the NAVIGATION_MODE property. When NAVIGATION_MODE_NONE is set no caret or pointer is rendered and it is up to the developer to handle any navigation.

Since:
BlackBerry API 5.0.0

NAVIGATION_MODE_CARET

public static final Integer NAVIGATION_MODE_CARET
Deprecated. Caret navigation mode is no longer supported. When used it is interpreted as equivalent to NAVIGATION_MODE_NODE
This is one of the four options for the NAVIGATION_MODE property. When NAVIGATION_MODE_CARET is set the method of navigation will be a "character-to-character" cursor.

Since:
BlackBerry API 5.0.0

NAVIGATION_MODE_POINTER

public static final Integer NAVIGATION_MODE_POINTER
This is one of the four options for the NAVIGATION_MODE property. When NAVIGATION_MODE_POINTER is set the method of navigation will be a a floating pointer.

Since:
BlackBerry API 5.0.0

NAVIGATION_MODE_NODE

public static final Integer NAVIGATION_MODE_NODE
This is one of the four options for the NAVIGATION_MODE property. When NAVIGATION_MODE_NODE is set the method of navigation will be node to node. This is the default navigation mode when none is set.

Since:
BlackBerry API 6.0.0

DISABLE_AUTO_FOCUS

public static final String DISABLE_AUTO_FOCUS
When set to true, BF2 will not grab focus automatically

See Also:
Constant Field Values
Since:
BlackBerry API 7.0.0


Constructor Detail

BrowserFieldConfig

public BrowserFieldConfig()
This method creates a new instance of BrowserFieldConfig with no properties set.

Since:
BlackBerry API 5.0.0


Method Detail

setProperty

public void setProperty(String key,
                        Object value)
                 throws IllegalArgumentException
This method sets a config property

Parameters:
key - The identifier for the desired property
value - The new config property value
Throws:
IllegalArgumentException - When the type of the value provided is not valid for the specified key.
Since:
BlackBerry API 5.0.0

getProperty

public Object getProperty(String key)
This method retrieves a config property

Parameters:
key - The identifier for the desired property
Returns:
The config property corresponding to the key provided
Since:
BlackBerry API 5.0.0

propertyExists

public boolean propertyExists(String key)
This checks for the existence of a config property

Parameters:
key - The identifier for the desired property
Returns:
true if the config property exists, false otherwise
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