|
|||||||||
| 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.ui.container.AbsoluteFieldManager
net.rim.device.api.ui.container.ComponentCanvas
public class ComponentCanvas
A manager that allows the placement of fields at specific x-y positions.
Fields can be placed anywhere on the screen and can even overlap. This
manager has similar functionality to AbsoluteFieldManager.
Unlike AbsoluteFieldManager, this manager is drawn on the screen
using the compositing engine. This manager is drawn on top of any standard
fields and managers. It can also be used on top of other fields and managers
that are drawn using the compositing engine.
A common use case for ComponentCanvas is to arrange a series
of buttons to appear on top of a video or camera field. A media field will
appear on top of all standard components.
ComponentCanvas does not scroll. To scroll a
ComponentCanvas, place it inside a scrollable manager. The
extent of a ComponentCanvas will match its virtual extent.
When you create a ComponentCanvas, you must provide a width
and a height.
The size of a ComponentCanvas can be changed by calling
ComponentCanvas.resize(int, int) or ComponentCanvas.resizeImmediately(int, int). If ComponentCanvas.resize(int, int) is used,
the change will be visible after the next layout (often a device rotation).
Warning: This type of manager consumes more memory than
AbsoluteFieldManager and should be used only in instances where
a standard AbsoluteFieldManager will not work. For performance
reasons, an application should try to limit the number of
ComponentCanvas managers that it uses at one time to three or
fewer.
| 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 |
| Constructor Summary | ||
|---|---|---|
ComponentCanvas(int width,
int height)
Constructs a new ComponentCanvas instance. |
||
| Method Summary | ||
|---|---|---|
void |
resize(int width,
int height)
Tells this manager to change its size on next layout |
|
void |
resizeImmediately(int width,
int height)
Tells this manager to change its size and do an immediate relayout. |
|
protected void |
sublayout(int width,
int height)
Implements custom layout features for this manager. |
|
| Methods inherited from class net.rim.device.api.ui.container.AbsoluteFieldManager |
|---|
add, getPreferredHeight, getPreferredWidth, insert, nextFocus, setPosChild |
| 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 |
| Constructor Detail |
|---|
public ComponentCanvas(int width,
int height)
ComponentCanvas instance.
width - The width of the ComponentCanvas.height - The height of the ComponentCanvas.| Method Detail |
|---|
protected void sublayout(int width,
int height)
ComponentCanvas will always lay itself out using its minimal
width and height, ignoring the parameters that are passed into this
method.
sublayout in class AbsoluteFieldManagerwidth - This parameter is ignored.height - This parameter is ignored.Manager.sublayout(int, int)
public void resize(int width,
int height)
width - The new width of this managerheight - The new height of this manager
public void resizeImmediately(int width,
int height)
width - The new width of this managerheight - The new height of this manager
|
|||||||||
| 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