|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.Field
net.rim.device.api.ui.ScrollView
net.rim.device.api.ui.Manager
net.rim.device.api.lbs.maps.ui.GlassField
net.rim.device.api.lbs.maps.ui.RichMapField
public final class RichMapField
Represents a field that is composed of a map (MapField), user input and user feedback
fields that are overlayed on top of the map.
Closure Note: This is a Closable
object. Once the client application is done with this object, the client application
must call close() to correctly release resources.
Device orientation: At this time, this
class does not listen for changes in device orientation.
The client application must listen for these changes and initiate the layout
recalculation that is appropriate to the client's situation. For information on
device orientation, refer to Display.
| Field Summary |
|---|
| 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 interface net.rim.device.api.ui.FieldChangeListener |
|---|
PROGRAMMATIC |
| Method Summary | ||
|---|---|---|
void |
add(Field field)
Adds a field to this manager. |
|
void |
add(Field field,
int x,
int y)
Adds the supplied field to this Manager at the location (x, y). |
|
void |
close()
|
|
void |
fieldChanged(Field field,
int actionId)
Invoked by a field when a property changes. |
|
MapAction |
getAction()
Gets the MapAction object for the base map of this field. |
|
int |
getFieldAtLocation(int x,
int y)
Retrieves the index of the field under a specified point. |
|
MapField |
getMapField()
Gets the base map field. |
|
MapDataModel |
getModel()
Gets the base map field's model. |
|
int |
getOperationMode()
Retrieves the current operation mode. |
|
int |
getPreferredHeight()
Retrieves the preferred height (in pixels). |
|
int |
getPreferredWidth()
Retrieves the preferred width (in pixels). |
|
boolean |
isFieldVisible(int id)
Determines if the given field is visible. |
|
boolean |
isOperationModeEnabled(int modeToCheck)
Verifies if a given operation mode is enabled. |
|
protected void |
sublayout(int width,
int height)
Implements custom layout features for this manager |
|
| Methods inherited from class net.rim.device.api.ui.ScrollView |
|---|
configurationChanged, getHorizontalAdjustment, getVerticalAdjustment, getVisibleHeight, getVisibleWidth, onDisplay, onExposed, onUndisplay, setCurrentLocation, setExtent, setHorizontalAdjustment, setHorizontalScroll, setHorizontalScroll, setScrollListener, setVerticalAdjustment, setVerticalScroll, setVerticalScroll, valueChanged, waitForScrolling |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void fieldChanged(Field field,
int actionId)
FieldChangeListener
fieldChanged in interface FieldChangeListenerfield - The field that changed.actionId - Information specifying the origin of the change. The context
value is used to provide detailed information about how the field was changed.
For example, see
ChoiceField.CONTEXT_CHANGE_OPTION
for the context information in ChoiceField.
Please check individual fields for more details.
context is FieldChangeListener.PROGRAMMATIC if the field was changed programmatically,
that is, not by user interaction.FieldChangeListener.fieldChanged(Field,int)public int getPreferredHeight()
GlassFieldThis method returns the height required to lay out the manager’s contents. The contents height is decided by baseManager's height
getPreferredHeight in class GlassFieldField.getPreferredHeight()public int getPreferredWidth()
GlassFieldThis method returns the width required to lay out the manager’s contents. The contents width is decided by baseManager's width
getPreferredWidth in class GlassFieldField.getPreferredWidth()
protected void sublayout(int width,
int height)
GlassField
sublayout in class GlassFieldwidth - Width available for this managerheight - Height available for this managerManager.sublayout(int, int)
public void close()
throws Exception
ExceptionClosable.close()public void add(Field field)
ManagerInvoke this method to add a new field at the end of this manager's list of controlled fields.
Notice that only one manager is allowed to control any single field, and a field can never manage itself.
add in class Managerfield - The field to add.Manager.add(Field)
public void add(Field field,
int x,
int y)
field - The field to add.x - The horizontal location to place the field, relative to the origins of this
Manager.y - The vertical location to place the field, relative to the origins of this
Manager.
public int getFieldAtLocation(int x,
int y)
ManagerGiven a point in coordinates local to this manager's extent, this method returns the index of the controlled field under that point (or -1 if no field found under the specified point).
This method constrains its search to the extent of this manager: if you provide a coordinate outside this manager's extent, this method uses values along the edges of the extent as required.
By default, this method performs a linear search hit, testing each controlled field in turn. If you implement a manager, you can override this method to optimize its functionality.
getFieldAtLocation in class GlassFieldx - The distance from the left edge of the manager's extent.y - The distance from the top edge of the manager's extent.
public MapField getMapField()
public MapAction getAction()
MapAction object for the base map of this field.
public boolean isOperationModeEnabled(int modeToCheck)
modeToCheck - The mode to verify. Operation modes are
defined in the MapConstants class and start with MODE_.
true if the mode is enabled, false
otherwise.public MapDataModel getModel()
public boolean isFieldVisible(int id)
id - The ID of the field.
true if the field is visible, false otherwise (including if
the field does not exist).public int getOperationMode()
MapConstants class and start with MODE_.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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