|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.ui.Field
|
+--net.rim.device.api.ui.Manager
|
+--net.rim.device.api.ui.container.HorizontalFieldManager
A manager that lays out fields along a single, horizontal row.
Behaviour
A horizontal field manager lays out fields left to right on a single row. You
can build this manager with Manager.HORIZONTAL_SCROLL to accommodate
collections of fields wider than the manager's visible frame; you can build
this manager with Manager.VERTICAL_SCROLL to accommodate fields taller than
the manager's visible frame.
| Field Summary |
| Fields inherited from class net.rim.device.api.ui.Manager |
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLL_MASK, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_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_SCROLL_MASK, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK |
| Constructor Summary | ||
HorizontalFieldManager()
Constructs a new horizontal field manager. |
||
HorizontalFieldManager(long style)
Constructs a new horizontal field manager with provided style. |
||
| Method Summary | ||
int |
getFieldAtLocation(int x,
int y)
Retrieves field under a particular point. |
|
int |
getPreferredHeight()
Retrieves this manager's preferred height. |
|
int |
getPreferredWidth()
Retrieves this manager's preferred width. |
|
protected void |
sublayout(int maxWidth,
int maxHeight)
Lays out this manager's controlled fields. |
|
protected void |
subpaint(Graphics graphics)
Redraws this manager's controlled fields. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HorizontalFieldManager()
This method builds a new horizontal field manager with no style.
public HorizontalFieldManager(long style)
style - Style(s) for this manager (can be Manager.HORIZONTAL_SCROLL
and/or Manager.VERTICAL_SCROLL).| Method Detail |
public int getFieldAtLocation(int x,
int y)
Given a point in coordinates local to this manager's extent, this method returns the index of the controlled field under that point.
If no field exists under the point you specify, this method returns -1.
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, testing each controlled field in turn. If you extend this manager, you can override this method to optimize its functionality.
getFieldAtLocation in class Managerx - Distance from left edge of this manager's extent.y - Distance from top edge of this manager's extent.public int getPreferredHeight()
This method returns the largest preferred height of all this manager's controlled fields.
getPreferredHeight in class Fieldpublic int getPreferredWidth()
This method returns the sum of all the preferred widths of this manager's controlled fields.
getPreferredWidth in class Fieldprotected void subpaint(Graphics graphics)
The framework invokes this method to direct this manager to repaint its controlled fields. This method examines the clipping rectangle contained in the graphics context parameter to determine which controlled fields are in the invalid region (require repainting), in order to prevent unnecessary redraws.
graphics - Graphics context used for the redraw operation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.