|
|||||||||
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.opengles.GLField
net.rim.device.api.lbs.compass.CompassField
public class CompassField
Represents a compass overlay field.
This field provides a graphical representation of a compass that can be added
to an application to provide directional context (for example, in a mapping
application, the compass displays where North is in relation to the user's
current location). The CompassField
can be instantiated
and added to a field manager like other UI components that are used in the BlackBerry Java SDK.
To add a compass overlay to your application, you must perform the following:
CompassField
by using CompassField.CompassField()
. CompassField
to a screen manager and lay it out at the desired screen location.CompassField.close()
to remove the field as a listener from specific classes,
ensuring that all appropriate classes can be garbage collected.
Field Summary |
---|
Fields inherited from class net.rim.device.api.opengles.GLField |
---|
DISABLE_SURFACE_SYNC_HINT, ERROR_CHOOSE_CONFIG, ERROR_COPY_BUFFERS, ERROR_CREATE_CONTEXT, ERROR_CREATE_SURFACE, ERROR_GET_DISPLAY, ERROR_INIT_DISPLAY, ERROR_MAKE_CURRENT, ERROR_NO_CONFIGS, ERROR_SWAP_BUFFERS, ERROR_WAIT_CLIENT, ERROR_WAIT_NATIVE, MIXED_MODE_RENDERING, TRANSPARENT, VERSION_1_1, VERSION_2_0 |
Constructor Summary | ||
---|---|---|
|
CompassField()
Constructs a CompassField instance. |
Method Summary | ||
---|---|---|
|
void |
close()
Closes the field and releases any resources for this field. |
|
void |
onData(AccelerometerData accData)
Notifies listener with new accelerometer data. |
|
protected void |
onUndisplay()
Invoked when the screen this field is attached to is popped off the display stack. |
Methods inherited from class net.rim.device.api.opengles.GLField |
---|
errorOccurred, getCurrentFrameRate, getPreferredColorBufferSize, getPreferredDepthBufferSize, getTargetFrameRate, initialize, onDisplay, onExposed, onObscured, onVisibilityChange, paint, render, setTargetFrameRate, sizeChanged, update |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.rim.device.api.animation.AnimationListener |
---|
animationBegin, animationEnd |
Methods inherited from interface net.rim.device.api.system.MagnetometerListener |
---|
onData |
Constructor Detail |
---|
public CompassField()
CompassField
instance.
Method Detail |
---|
public void close()
public void onData(AccelerometerData accData)
onData
in interface AccelerometerListener
accData
- accelerometer data containing subscribed informationprotected void onUndisplay()
Field
The complementing callback is Field.onDisplay()
.
onUndisplay
in class GLField
Field.onUndisplay()
|
|||||||||
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