net.rim.device.api.lbs.picker
Class MapsLocationPicker

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.ScrollView
          extended by net.rim.device.api.ui.Manager
              extended by net.rim.device.api.ui.Screen
                  extended by net.rim.device.api.ui.container.PopupScreen
                      extended by net.rim.device.api.lbs.picker.AbstractLocationPicker
                          extended by net.rim.device.api.lbs.picker.MapsLocationPicker
All Implemented Interfaces:
LocationPicker.Picker, AdjustmentListener, FieldChangeListener

public class MapsLocationPicker
extends AbstractLocationPicker

The MapsLocationPicker provides the ability for a user to select a location from the BlackBerry Maps application. The BlackBerry Maps application will be invoked, allowing the user to the full functionality of the application such as zoom, pan, search, etc. Two additional menu items will be added to the BlackBerry Maps menu:

  1. Select location...
  2. Cancel selection...

When a location is returned from the BlackBerry Maps application, reverse geocoding information will be requested and attached.

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

Field Summary
 
Fields inherited from class net.rim.device.api.lbs.picker.AbstractLocationPicker
CANCEL, CLOSE
 
Fields inherited from class net.rim.device.api.ui.Screen
DEFAULT_CLOSE, DEFAULT_MENU, NO_SYSTEM_MENU_ITEMS
 
Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK
 
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
 
Fields inherited from interface net.rim.device.api.ui.FieldChangeListener
PROGRAMMATIC
 
Constructor Summary
Category: Signed protected MapsLocationPicker(Manager delegate, MapsArguments mapsArguments)
          Construct a MapsLocationPicker
 
Method Summary
Category: Signed protected  void closePicker(int reason)
          Close the picker Subclasses that override this method should call this class's implementation i.e.
Category: Signed static MapsLocationPicker getInstance()
          Get an instance of the "Find on a map..."
Category: Signed static MapsLocationPicker getInstance(MapsArguments mapsArguments)
          Get an instance of the "Find on a map..."
Category: Signed  void setMapsArguments(MapsArguments mapsArguments)
          Set the map arguments to invoke the BlackBerry Maps application with
 
Methods inherited from class net.rim.device.api.lbs.picker.AbstractLocationPicker
cancelPickLocation, doModal, fieldChanged, getLocation, getLocationPickerName, isLocationPersistable, pickLocation, setLocation
 
Methods inherited from class net.rim.device.api.ui.container.PopupScreen
getAccessibleContext, paint, sublayout
 
Methods inherited from class net.rim.device.api.ui.Screen
add, addInputSettings, addKeyListener, addScreenUiEngineAttachedListener, addTrackwheelListener, clearInputSettings, close, cursorClick, cursorUnclick, delete, deleteRange, doPaint, ensureRegionVisible, getApplication, getContextMenuProvider, getDefaultMenuItem, getDelegate, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getGraphics, getInputHelper, getInputSettings, getLeafFieldWithFocus, getMenu, getScreenAbove, getScreenBelow, getServiceMode, getTitleBar, getUiEngine, getVirtualKeyboard, insert, invalidate, invalidate, invalidateAll, invalidateLayout, invokeAction, isDataValid, isDirty, isDisplayed, isFocus, isFocusable, isGlobal, isGlobalStatus, isMuddy, isSelecting, keyChar, keyCharUnhandled, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layoutDelegate, makeMenu, navigationClick, navigationMovement, navigationUnclick, onClose, onDisplay, onExposed, onFocus, onFocusNotify, onMenu, onMenuDismissed, onMenuDismissed, onObscured, onSave, onSavePrompt, onUiEngineAttached, onUndisplay, onUnfocus, openDevelopmentBackdoor, openProductionBackdoor, paintBackground, removeFocus, removeInputSettings, removeKeyListener, removeScreenUiEngineAttachedListener, removeTrackwheelListener, replace, save, scroll, setBackdoorAltStatus, setContextMenuProvider, setDefaultClose, setDirty, setFocus, setFocus, setHorizontalQuantization, setInputHelper, setPositionDelegate, setServiceMode, setServiceModeImpl, setTitleBar, setTrackballFilter, setTrackballSensitivityXOffset, setTrackballSensitivityYOffset, setVerticalQuantization, suggestServiceMode, touchEvent, trackwheelClick, trackwheelClickUnhandled, trackwheelRoll, trackwheelUnclick, updateDisplay
 
Methods inherited from class net.rim.device.api.ui.Manager
addAll, deleteAll, getHorizontalScroll, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, insertAll, invalidateFieldRange, isDownArrowShown, isUpArrowShown, isValidLayout, layout, layoutChild, moveFocus, moveFocus, nextFocus, nextFocus, paintChild, setFocus, setPositionChild, setScrollingInertial, setVirtualExtent, subpaint
 
Methods inherited from class net.rim.device.api.ui.ScrollView
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getCommandItemProvider, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getOriginal, getPadding, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTextFillColor, getTextStrokeColor, getTop, getVisualState, getWidth, isEditable, isEnabled, isLeftToRight, isPasteable, isScrollCopyable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCommandItemProvider, setCookie, setEditable, setEnabled, setFocusListener, setFont, setFont, setMargin, setMargin, setMuddy, setNonSpellCheckable, setPadding, setPadding, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

MapsLocationPicker

protected MapsLocationPicker(Manager delegate,
                             MapsArguments mapsArguments)
Construct a MapsLocationPicker

Parameters:
delegate - Manager this screen uses as a layout delegate.
mapsArguments - arguments to invoke BlackBerry Maps with
Throws:
NullPointerException - if manager passed in is null.
IllegalStateException - - if BlackBerry Maps is not installed
SecurityException - - if BlackBerry Maps is disabled by ITPolicy
ControlledAccessException - If the application does not have PERMISSION_LOCATION_DATA permission
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


Method Detail

getInstance

public static MapsLocationPicker getInstance()
Get an instance of the "Find on a map..." LocationPicker option

Returns:
instance of the MapsLocationPicker
Throws:
IllegalStateException - - if BlackBerry Maps is not installed
SecurityException - - if BlackBerry Maps is disabled by ITPolicy
ControlledAccessException - If the application does not have PERMISSION_LOCATION_DATA permission
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

getInstance

public static MapsLocationPicker getInstance(MapsArguments mapsArguments)
Get an instance of the "Find on a map..." LocationPicker option

Parameters:
mapsArguments - arguments to invoke BlackBerry Maps with
Returns:
instance of the MapsLocationPicker
Throws:
IllegalStateException - - if BlackBerry Maps is not installed
SecurityException - - if BlackBerry Maps is disabled by ITPolicy
ControlledAccessException - If the application does not have PERMISSION_LOCATION_DATA permission
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

setMapsArguments

public void setMapsArguments(MapsArguments mapsArguments)
Set the map arguments to invoke the BlackBerry Maps application with

Parameters:
mapsArguments - arguments to pass to the BlackBerry Maps 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 5.0.0

closePicker

protected void closePicker(int reason)
Close the picker

Subclasses that override this method should call this class's implementation i.e. direct subclasses call super.closePicker(int).

Overrides:
closePicker in class AbstractLocationPicker
Parameters:
reason - CLOSE or CANCEL
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-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