|
|||||||||
| 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.toolbar.ToolbarSetManager
public class ToolbarSetManager
A ToolbarSetManager is a collection of ToolbarButtonField objects. Like a ToolbarButtonField,
a ToolbarSetManager has an ordinal and can be added to a ToolbarManager.
Treatment of Ordinals
The ToolbarSetManager is responsible for ensuring that sort order based on ordinals is correctly maintained.
When inserting a ToolbarSetManager into a ToolbarManager, the ToolbarManager inserts
the ToolbarSetManager as a whole entity based on the call of getOrdinal.
ToolbarManager,
ToolbarButtonField| 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 | ||
|---|---|---|
ToolbarSetManager()
Creates an empty ToolbarSetManager with the default style 0L and ordinal of 0. |
||
ToolbarSetManager(int ordinal)
Creates an empty ToolbarSetManager with the default style 0L and a specified ordinal. |
||
ToolbarSetManager(long style,
int ordinal)
Creates an empty ToolbarSetManager with the specified style and ordinal. |
||
| Method Summary | ||
|---|---|---|
void |
add(Field field)
Adds a field to this manager based on the ordinal of the field. |
|
void |
addAll(Field[] fields)
Adds mutiple fields to the ToolbarSetManager by calling add(Field) on each object in the specified array. |
|
void |
delete(Field field)
Deletes the specified field from this manager. |
|
int |
getOrdinal()
The ordinal of this ToolbarSetManager as specified on creation. |
|
int |
getPreferredWidth()
Retrieves the sum of Field.getPreferredWidth() of all of the children of this manager. |
|
void |
insert(Field field,
int index)
This method is not supported by ToolbarSetManager. |
|
void |
insertAll(Field[] fields,
int index)
This method is not supported by ToolbarSetManager. |
|
void |
replace(Field oldField,
Field newField)
Replaces an existing field with a new field. |
|
void |
sublayout(int width,
int height)
The layout is done very similiarly to {@link ToolbarManager#sublayout). |
|
| 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 ToolbarSetManager()
ToolbarSetManager with the default style 0L and ordinal of 0.
public ToolbarSetManager(int ordinal)
ToolbarSetManager with the default style 0L and a specified ordinal.
ordinal - The sort order of this field within a ToolbarManager.
public ToolbarSetManager(long style,
int ordinal)
ToolbarSetManager with the specified style and ordinal.
Supports USE_ALL_WIDTH.
ordinal - The sort order of this field within a ToolbarManager.style - if USE_ALL_WIDTH is set, then each controlled field is provided with the available width during layout.| Method Detail |
|---|
public void add(Field field)
add in class Managerfield - A ToolbarButtonField to add.
IllegalArgumentException - If field is not an instance of ToolbarButtonField.ToolbarManager.add(net.rim.device.api.ui.Field)public void addAll(Field[] fields)
ToolbarSetManager by calling add(Field) on each object in the specified array.
addAll in class Managerfields - Array of Field objects to insert.
IllegalArgumentException - If field is not an instance of ToolbarButtonField.public void delete(Field field)
delete in class Managerfield - A ToolbarButtonField to delete from this manager.
IllegalArgumentException - If field is not an instance of ToolbarButtonField.ToolbarManager.delete(net.rim.device.api.ui.Field)
public void replace(Field oldField,
Field newField)
replace in class ManageroldField - A Field to replace that is an instance of ToolbarButtonField.newField - The Field to replace oldField that is an instance of ToolbarButtonField.
IllegalArgumentException - If oldField or newField is not an instance of ToolbarButtonField.
IllegalArgumentException - if oldField ordinal does not match newField ordinal.Manager.delete(Field),
Manager.insert(Field, int),
Field.getIndex(),
Field.getManager(),
Field.setFocus()public final int getOrdinal()
ToolbarSetManager as specified on creation.
public int getPreferredWidth()
Field.getPreferredWidth() of all of the children of this manager.
getPreferredWidth in class Fieldsublayout
public void insert(Field field,
int index)
ToolbarSetManager. Please use ToolbarSetManager.add(net.rim.device.api.ui.Field) to insert fields.
insert in class Managerfield - Field to insert.index - Index to insert field at.
UnsupportedOperationException - If this method is used.
public void insertAll(Field[] fields,
int index)
ToolbarSetManager. Please use ToolbarSetManager.addAll(net.rim.device.api.ui.Field[]) to insert fields.
insertAll in class Managerfield - Fields to insert.index - Index at which to begin inserting.
UnsupportedOperationException - If this method is used.
public void sublayout(int width,
int height)
sublayout in class Managerwidth - The width available for layout.height - The height available for layout.
|
|||||||||
| 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