net.rim.device.api.lbs.maps.ui
Class MapField
java.lang.Object
net.rim.device.api.ui.Field
net.rim.device.api.lbs.maps.ui.MapField
public class MapField
- extends Field
Provides the main functionality for embedding a map in an application.
To embed a basic map, create an instance of the MapField
and add it to the screen, as shown in the following example:
MapField map = new MapField();
add(map);
Thread Resource Note: Each instance of a
MapField uses a thread for its rendering requirements. The
rendering thread ends when the MapField is garbage
collected. For example, if a client application has two MapFields
running at the same time, two threads are used. Each BlackBerry device
application has a limited number of threads, so make sure that the
client application does not exceed that limitation.
Note: You must explicitly close
this class. When this is done, the field removes itself as a listener
from specific classes, ensuring that all appropriate classes can be
garbage collected.
- 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
| Fields inherited from class net.rim.device.api.ui.Field |
ACTION_INVOKE, AXIS_HORIZONTAL, AXIS_SEQUENTIAL, AXIS_VERTICAL, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEADING, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_TRAILING, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH, VISUAL_STATE_ACTIVE, VISUAL_STATE_DISABLED, VISUAL_STATE_DISABLED_FOCUS, VISUAL_STATE_FOCUS, VISUAL_STATE_NORMAL |
|
Constructor Summary |
|
MapField()
Constructs a new MapField instance. |
|
MapField(int fieldWidth,
int fieldHeight)
Constructs a new MapField instance using the field's
dimensions. |
|
MapField(MapDataModel model)
Constructs a new MapField instance using a data model. |
|
MapField(MapDataModel model,
int fieldWidth,
int fieldHeight)
Constructs a new MapField instance using the specified
data model, and field dimensions. |
|
Method Summary |
|
void |
addChangeListener(FieldChangeListener listener)
Adds the given FieldChangeListener to the list of listeners. |
|
void |
close()
|
|
void |
displayMapURL(String url)
Changes this field to reflect the information provided in the URL. |
|
MapAction |
getAction()
Retrieves the action object for this field. |
|
MapDimensions |
getDimensions()
Retrieves the dimensions of the map field's visible area. |
|
Bitmap |
getImage()
Retrieves the image of the current screen. |
|
EncodedImage |
getImageEncoded()
Retrieves an image of the current screen as a PNG-encoded image. |
|
MapDataModel |
getModel()
Retrieves the container that stores the user-generated map data
for this MapField. |
|
int |
getOperationMode()
Gets the current operation mode. |
|
int |
getPreferredHeight()
Retrieves this field's preferred height. |
|
int |
getPreferredWidth()
Retrieves this field's preferred width. |
|
String |
getURL()
Creates a valid URL based on the MapField which can be
used to recreate this map on another BlackBerry device. |
|
boolean |
isAutoUpdate()
Gets the state of the auto update value. |
|
boolean |
isFocusable()
Determines if this field accepts the focus. |
|
boolean |
isOperationModeEnabled(int modeToCheck)
Verifies if an operation mode is currently enabled. |
|
boolean |
keyChar(char character,
int status,
int time)
Handles character generation events. |
|
boolean |
keyControl(char character,
int status,
int time)
Handles control character generation events. |
|
boolean |
keyDown(int keycode,
int time)
Handles key down events. |
|
boolean |
keyRepeat(int keycode,
int time)
Handles key repeat events. |
|
boolean |
keyStatus(int keycode,
int time)
Handles key status events. |
|
boolean |
keyUp(int keycode,
int time)
Handles key up events. |
|
protected void |
layout(int width,
int height)
Lays out field contents. |
|
boolean |
navigationClick(int status,
int time)
Invoked when the navigational action is selected. |
|
boolean |
navigationMovement(int dx,
int dy,
int status,
int time)
Invoked when a navigational motion occurs. |
|
boolean |
navigationUnclick(int status,
int time)
Invoked when the navigational action is released. |
|
protected void |
paint(Graphics graphics)
Invoked by the framework to redraw a portion of this field. |
|
void |
removeChangeListener(FieldChangeListener listener)
Removes the given FieldChangeListener from the list of
listeners. |
|
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto update value to update the screen. |
|
void |
setDimensions(MapDimensions newVisibleArea)
Sets the new dimensions of the map field's visible area. |
|
void |
setModel(MapDataModel newModel)
Sets the container that manages the user-generated map data
for this MapField. |
|
protected boolean |
touchEvent(TouchEvent message)
Indicates a touch event. |
|
void |
update()
Updates the viewing area. |
|
void |
update(boolean centreAndZoomVisible)
Updates the viewing area, and automatically recalculates the centre
and zoom factors based on the visible data. |
| Methods inherited from class net.rim.device.api.ui.Field |
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getAccessibleContext, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getCommandItemProvider, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFocusRect, getFont, getHeight, getIndex, getLeafFieldWithFocus, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getScreen, getStyle, getTop, getVisualState, getWidth, invalidate, invalidate, invalidateAll, invokeAction, isDataValid, isDirty, isEditable, isEnabled, isFocus, isMuddy, isPasteable, isScrollCopyable, isSelectable, isSelecting, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, moveFocus, moveFocus, onDisplay, onExposed, onFocus, onMenuDismissed, onMenuDismissed, onObscured, onUndisplay, onUnfocus, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCommandItemProvider, setCookie, setDirty, setEditable, setEnabled, setExtent, setFocus, setFocusListener, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, trackwheelClick, trackwheelUnclick, updateLayout |
MapField
public MapField()
- Constructs a new
MapField instance. The field's
preferred size (not actual size) is determined by using the width
and height of the screen. If this field is in a manager, the
manager dictates the field's actual size.
- 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
MapField
public MapField(MapDataModel model)
- Constructs a new
MapField instance using a data model.
This builds a map field using the width and height of the screen to
set the field's preferred size (not actual size). If this field is
in a manager, the manager dictates the field's actual size.
- Parameters:
model - The data model for this field.- 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
MapField
public MapField(int fieldWidth,
int fieldHeight)
- Constructs a new
MapField instance using the field's
dimensions.
- Parameters:
fieldWidth - The width of the field (in pixels).fieldHeight - The height of the field (in pixels).- 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
MapField
public MapField(MapDataModel model,
int fieldWidth,
int fieldHeight)
- Constructs a new
MapField instance using the specified
data model, and field dimensions. This constructor performs all
necessary initializations.
- Parameters:
model - The data model for this field.fieldWidth - The width of the field (in pixels).fieldHeight - The height of the field (in pixels).- 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
paint
protected void paint(Graphics graphics)
- Description copied from class:
Field
- Invoked by the framework to redraw a portion of this field.
This is an abstract method; any class that extends Field must
implement this method appropriate to its needs.
A field's manager invokes this method when an area of this field has
been marked as invalid. All painting should be done in field-local
coordinates (for example, 0,0 is the top left corner of the field's
pane).
The clipping rectangle is available (in local coordinates) through
Graphics.getClippingRect(). You can use this rectangle to
determine the minimal amount of drawing required to satisfy the paint
request. Large controls should make use of this for more efficient
painting, particularly during scroll operations.
Preconditions for the paint method
Routines that invoke this method on a field ensure that
this.getFont() == graphics.getFont() and that the
appropriate clipping rect and transformation stack are set up, so that
this method draws on the appropriate area of this field.
Should you implement a layout manager (for example) of your own, be
aware that you must ensure these conditions are met before invoking
this method in child Fields.
- Specified by:
paint in class Field
- Parameters:
graphics - Graphics context for drawing in this field.- See Also:
Field.paint(net.rim.device.api.ui.Graphics)- 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
layout
protected void layout(int width,
int height)
- Description copied from class:
Field
- Lays out field contents.
This method is abstract; any class that extends Field must implement
this method appropriate to its needs.
Invoked after the screen has been created, or when system
parameters change (for example, after a system font change).
Field.getExtent() will return a valid value after this method is
invoked. Implementations of this method must invoke Field.setExtent(int, int)
with the size used by the field.
During this call, Field.setExtent(int, int) must be called with parameters
such that both width and height are between 0 and the values passed
into this function for the Manager to be able to position this Field
properly.
Fields may cache system attributes for efficiency (such as the
current system font); however, they cannot depend on these attributes
remaining unchanged. When one of these attributes changes, a message
event is sent to that effect: in these cases, this method refetch and
cache these attributes.
- Specified by:
layout in class Field
- Parameters:
width - Amount of available horizontal space.height - Amount of available vertical space.- See Also:
Field.layout(int, int)- 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
getPreferredHeight
public int getPreferredHeight()
- Description copied from class:
Field
- Retrieves this field's preferred height.
Your implementation of getPreferredHeight() should return the height
of your custom field if it has any amount of space available.
Managers may make use of this value during layout.
Override this method to request a certain height for your field.
- Overrides:
getPreferredHeight in class Field
- Returns:
- Preferred height for this field in pixels.
- See Also:
Field.getPreferredHeight()- 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
getPreferredWidth
public int getPreferredWidth()
- Description copied from class:
Field
- Retrieves this field's preferred width.
Your implementation of getPreferredWidth() should return the width
of your custom field if it has any amount of space available.
Managers make use of this value during layout.
Override this method to request a certain width for your field.
- Overrides:
getPreferredWidth in class Field
- Returns:
- Preferred width for this field in pixels.
- See Also:
Field.getPreferredWidth()- 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
isFocusable
public boolean isFocusable()
- Description copied from class:
Field
- Determines if this field accepts the focus.
By default, this method checks the field style to determine whether
this field is Field.FOCUSABLE.
- Overrides:
isFocusable in class Field
- Returns:
- True if this field can accept the focus; otherwise, false.
- See Also:
Field.isFocusable()- 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
close
public void close()
throws Exception
- Throws:
Exception- See Also:
Closable.close()- 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
keyChar
public final boolean keyChar(char character,
int status,
int time)
- Description copied from class:
Field
- Handles character generation events.
This field's manager invokes this method to send this field a
character event.
Special keystroke handling code should be implemented in the Field
keyDown method. However, this code checks for cut, copy, or paste
keystrokes and dispatches to the appropriate field.
While selection mode is on, ESC cancels selection, and SHIFT+DEL cuts
selection.
- Overrides:
keyChar in class Field
- Parameters:
character - Character generated.status - Modifier key status. See KeypadListener.time - Number of milliseconds since the device was turned on.
- Returns:
- True if this method consumed the event; 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 6.0.0
keyControl
public final boolean keyControl(char character,
int status,
int time)
- Description copied from class:
Field
- Handles control character generation events.
This field's manager invokes this method to send this field a control
character event.
- Overrides:
keyControl in class Field
- Parameters:
character - Character generated.status - Modifier key status. See KeypadListener.time - Number of milliseconds since the device was turned on.
- Returns:
- True if this method consumed the event; 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 6.0.0
keyDown
public final boolean keyDown(int keycode,
int time)
- Description copied from class:
Field
- Handles key down events.
By default, this method returns false; custom fields that specially
handle key down events must override this method.
- Overrides:
keyDown in class Field
- Parameters:
keycode - Code of key pressed.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
keyRepeat
public final boolean keyRepeat(int keycode,
int time)
- Description copied from class:
Field
- Handles key repeat events.
By default, this method returns false; custom fields that specially
handle key repeat events must override this method.
- Overrides:
keyRepeat in class Field
- Parameters:
keycode - Code of key repeated.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
keyStatus
public final boolean keyStatus(int keycode,
int time)
- Description copied from class:
Field
- Handles key status events.
By default, this method returns false; custom fields that specially
handle key status events must override this method.
- Overrides:
keyStatus in class Field
- Parameters:
keycode - Code of status key.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
keyUp
public final boolean keyUp(int keycode,
int time)
- Description copied from class:
Field
- Handles key up events.
By default, this method returns false; custom fields that specially
handle key up events must override this method.
- Overrides:
keyUp in class Field
- Parameters:
keycode - Code of key released.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
navigationClick
public final boolean navigationClick(int status,
int time)
- Description copied from class:
Field
- Invoked when the navigational action is selected.
The system invokes this method when passing on a navigational click event.
The ALT-click combination will enter selection mode, or if in
selection mode will copy.
The source of the navigation event can be determined by checking the
KeypadListener.STATUS_TRACKWHEEL and KeypadListener.STATUS_FOUR_WAY
bits in the status parameter; exactly one of them will be set.
- Overrides:
navigationClick in class Field
- Parameters:
status - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
- Returns:
- True if this method consumed the event; 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 6.0.0
navigationMovement
public final boolean navigationMovement(int dx,
int dy,
int status,
int time)
- Description copied from class:
Field
- Invoked when a navigational motion occurs.
The source of the navigation event can be determined by checking the
KeypadListener.STATUS_TRACKWHEEL and KeypadListener.STATUS_FOUR_WAY
bits in the status parameter; exactly one of them will be set.
- Overrides:
navigationMovement in class Field
- Parameters:
dx - Magnitude of navigational motion: negative for a move left
and positive for a move right.dy - Magnitude of navigational motion: negative for an upwards
move, and positive for a downwards move.status - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
navigationUnclick
public final boolean navigationUnclick(int status,
int time)
- Description copied from class:
Field
- Invoked when the navigational action is released.
The system invokes this method when passing on a navigational release event.
The source of the navigation event can be determined by checking the
KeypadListener.STATUS_TRACKWHEEL and KeypadListener.STATUS_FOUR_WAY
bits in the status parameter; exactly one of them will be set.
- Overrides:
navigationUnclick in class Field
- Parameters:
status - Bitfield of values defined by KeypadListener.time - Number of milliseconds since the device was turned on.
- Returns:
- False (classes that extend Field must override this method to
provide specific 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 6.0.0
touchEvent
protected final boolean touchEvent(TouchEvent message)
- Description copied from class:
Field
- Indicates a touch event.
- Overrides:
touchEvent in class Field
- Parameters:
message - TouchEvent object containing various input parameters
including the event type and touch coordinates.
- Returns:
- True if this method consumed the event; 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 6.0.0
getModel
public MapDataModel getModel()
- Retrieves the container that stores the user-generated map data
for this
MapField.
- Returns:
- The model that stores the date for this
MapField. - 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
setModel
public void setModel(MapDataModel newModel)
- Sets the container that manages the user-generated map data
for this
MapField.
- Parameters:
newModel - The model that manages the data for this
MapField.- 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
getDimensions
public MapDimensions getDimensions()
- Retrieves the dimensions of the map field's visible area.
- Returns:
- The dimension of the visible area.
- 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
setDimensions
public void setDimensions(MapDimensions newVisibleArea)
- Sets the new dimensions of the map field's visible area.
- Parameters:
newVisibleArea - The new dimensions of the visible area.- 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
update
public void update()
- Updates the viewing area. This method does not recalculate the
centre of the screen or the appropriate zoom factor.
- 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
update
public void update(boolean centreAndZoomVisible)
- Updates the viewing area, and automatically recalculates the centre
and zoom factors based on the visible data.
- Parameters:
centreAndZoomVisible - If true the centre and zoom
factors are recalculated, if false the area is redrawn
using the existing centre and zoom factors.- 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
getAction
public MapAction getAction()
- Retrieves the action object for this field.
- Returns:
- The action 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 6.0.0
setAutoUpdate
public void setAutoUpdate(boolean autoUpdate)
- Sets the auto update value to update the screen. When auto update
is turned on, if a
MapAction.setCentre(net.rim.device.api.lbs.maps.model.MapPoint) or MapAction.setZoom(int) command is executed, the screen is automatically
updated. When auto update is turned off, the user of this field
must explicitly execute update() to update the
screen.
- Parameters:
autoUpdate - If true the auto update is turned on,
if false the auto update is turned off.- 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
isAutoUpdate
public boolean isAutoUpdate()
- Gets the state of the auto update value.
- Returns:
true if auto update is turned on,
false otherwise.- See Also:
MapField.setAutoUpdate(boolean)- 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
getImage
public Bitmap getImage()
- Retrieves the image of the current screen.
Note: The image that is returned reflects the map in its
last non-transitional state. When a user performs an action on the
field (for example, pinch to zoom or pan), the map is considered to
be in a transitional state, which is not reflected in the returned
image.
- Returns:
- An image of the current screen.
- 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
getImageEncoded
public EncodedImage getImageEncoded()
- Retrieves an image of the current screen as a PNG-encoded image.
Note: The image that is returned reflects the map in its
last non-transitional state. When a user performs an action on the
field (for example, pinch to zoom or pan), the map is considered to
be in a transitional state, which is not reflected in the returned
image.
- Returns:
- A PNG-encoded image of the current screen.
- 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
getURL
public String getURL()
- Creates a valid URL based on the
MapField which can be
used to recreate this map on another BlackBerry device.
The URL is composed of the following items:
- The centre point derived from the map dimensions.
- The focused mappable if it is not the centre point.
This also includes any data about this point such as address, label
and description.
- The My Location accuracy circle is added, if it is available.
Any of the given items can be defined as the centre point, if that
is how the map is using them.
- Returns:
- A valid URL that can be used to recreate this map on another
BlackBerry device.
- 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
displayMapURL
public void displayMapURL(String url)
throws MapException
- Changes this field to reflect the information provided in the URL.
- Parameters:
url - The URL that contains the information to be displayed
in this field.
- Throws:
MapException - if errors occurred during the parsing of the
URL string.- 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
addChangeListener
public void addChangeListener(FieldChangeListener listener)
- Adds the given
FieldChangeListener to the list of listeners.
This method checks for duplication and null.
- Parameters:
listener - The specified FieldChangeListener.- 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
removeChangeListener
public void removeChangeListener(FieldChangeListener listener)
- Removes the given
FieldChangeListener from the list of
listeners.
- Parameters:
listener - The specified FieldChangeListener.- 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
getOperationMode
public int getOperationMode()
- Gets the current operation mode. Operation modes are
defined in
MapConstants.
- Returns:
- The current operation mode.
- 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
isOperationModeEnabled
public final boolean isOperationModeEnabled(int modeToCheck)
- Verifies if an operation mode is currently enabled.
Operation modes are defined in
MapConstants.
- Parameters:
modeToCheck - The operation mode to verify.
- Returns:
true if the mode or any of the composing modes
are enabled, false otherwise.- 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
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.