|
MIDP3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ItemLayoutHint
ItemLayoutHint is an interface to identify classes containing hints
that control the layout of Items by subclasses of
FormLayoutPolicy.
Each layout subclass defines the classes that specify
the hints it uses and how they affect layout.
Refer to the subclasses of FormLayoutPolicy
for a description of the layout hints accepted.
For example, a layout policy might choose to display items in a priority order. Each item would need to have a priority set for it.
class ItemPriority implements ItemLayoutHint {
int getPriority();
void setPriority(int priority);
}
To set the priority of each item an ItemPriority class would be
created and set for each item.
Item[] items = ...
for (int i = 0; i < items.length; i++) {
// Set the priority to reverse the list.
ItemPriority prio = new ItemPriority(items.length - i);
items[i].setLayoutHint(prio);
}
Item.setLayoutHint(javax.microedition.lcdui.ItemLayoutHint)
|
MIDP3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||