|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Item
javax.microedition.lcdui.CustomItem
de.enough.polish.ui.FakeCustomItem
de.enough.polish.ui.FakeContainerCustomItem
de.enough.polish.ui.TreeItem
public class TreeItem
Provides a tree of items that can contain several branches.
Each tree branch behaves like a normal J2ME Polish container, so you can specify view-types, columns, colspans, etc.
Copyright (c) Enough Software 2005 - 2008
history
16-Feb-2005 - rob creation
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.FakeContainerCustomItem |
|---|
allowCycling, autoFocusEnabled, autoFocusIndex, availableHeight, containerView, enableScrolling, focusedIndex, focusedItem, focusedStyleFirst, focusedStyleLast, isExpandItems, itemsList, itemStyle, lastPointerPressY, plainStyle, SCROLL_DEFAULT, SCROLL_SMOOTH, scrollSmooth, targetYOffset, yOffset |
| Fields inherited from class javax.microedition.lcdui.CustomItem |
|---|
KEY_PRESS, KEY_RELEASE, KEY_REPEAT, NONE, POINTER_DRAG, POINTER_PRESS, POINTER_RELEASE, TRAVERSE_HORIZONTAL, TRAVERSE_VERTICAL |
| Constructor Summary | |
|---|---|
TreeItem(java.lang.String label)
Creates a new tree item. |
|
TreeItem(java.lang.String label,
Style style)
Creates a new tree item. |
|
| Method Summary | |
|---|---|
void |
appendToNode(javax.microedition.lcdui.Item node,
javax.microedition.lcdui.Item item)
Adds the specified item to this tree. |
void |
appendToNode(Item node,
Item item)
Adds the specified item to this tree. |
void |
appendToNode(Item node,
Item item,
Style nodeStyle)
Adds the specified item to this tree. |
javax.microedition.lcdui.Item |
appendToNode(javax.microedition.lcdui.Item node,
java.lang.String text,
javax.microedition.lcdui.Image image)
Adds the specified text/image to this tree. |
Item |
appendToNode(Item node,
java.lang.String text,
javax.microedition.lcdui.Image image)
Adds the specified text/image to this tree. |
Item |
appendToNode(Item node,
java.lang.String text,
javax.microedition.lcdui.Image image,
Style childStyle)
Adds the specified text/image to this tree. |
void |
appendToRoot(javax.microedition.lcdui.Item item)
Adds the specified item to this tree. |
void |
appendToRoot(Item item)
Adds the specified item to this list. |
void |
appendToRoot(Item item,
Style nodeStyle)
Adds the specified item to this list. |
javax.microedition.lcdui.Item |
appendToRoot(java.lang.String text,
javax.microedition.lcdui.Image image)
Appends the specified text and image to this list. |
javax.microedition.lcdui.Item |
appendToRoot(java.lang.String text,
javax.microedition.lcdui.Image image,
Style rootStyle)
Appends the specified text and image to this list and provides it with the given style. |
void |
collapseAll()
Collapses all branches of this TreeItem. |
protected Style |
focus(Style focusStyle,
int direction)
Focuses this item. |
Item[] |
getSelectedPath()
Retireves the currently selected path of this tree item. |
java.lang.Object[] |
getSelectedPathAsAttributes(java.lang.Object key)
Retireves the currently selected path of this tree item. |
boolean |
remove(javax.microedition.lcdui.Item item)
Removes the specified item from this list. |
void |
removeAll()
Clears this list. |
void |
setSelectedPathByAttribute(java.lang.Object key,
java.lang.Object[] values)
Opens the tree and focuses the specified items. |
void |
setStyle(Style style)
Sets the style of this item. |
| Methods inherited from class javax.microedition.lcdui.CustomItem |
|---|
getGameAction, getInteractionModes, invalidate, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, sizeChanged, traverse, traverseOut |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TreeItem(java.lang.String label)
label - the label of this item
public TreeItem(java.lang.String label,
Style style)
label - the label of this itemstyle - the style| Method Detail |
|---|
public void appendToRoot(javax.microedition.lcdui.Item item)
item - the item that should be added
public void appendToNode(javax.microedition.lcdui.Item node,
javax.microedition.lcdui.Item item)
node - the parent node that has been previously added to this treeitem - the item that should be added
public javax.microedition.lcdui.Item appendToNode(javax.microedition.lcdui.Item node,
java.lang.String text,
javax.microedition.lcdui.Image image)
node - the parent node that has been previously added to this treetext - the textimage - the image
public boolean remove(javax.microedition.lcdui.Item item)
item - the item that should be removed
public javax.microedition.lcdui.Item appendToRoot(java.lang.String text,
javax.microedition.lcdui.Image image)
text - the textimage - the image
public javax.microedition.lcdui.Item appendToRoot(java.lang.String text,
javax.microedition.lcdui.Image image,
Style rootStyle)
text - the textimage - the imagerootStyle - the style
public void appendToRoot(Item item)
item - the item that should be added
public void appendToRoot(Item item,
Style nodeStyle)
item - the item that should be addednodeStyle - the style
public Item appendToNode(Item node,
java.lang.String text,
javax.microedition.lcdui.Image image)
node - the parent node that has been previously added to this treetext - the textimage - the image
public Item appendToNode(Item node,
java.lang.String text,
javax.microedition.lcdui.Image image,
Style childStyle)
node - the parent node that has been previously added to this treetext - the textimage - the imagechildStyle - the style
public void appendToNode(Item node,
Item item)
node - the parent node that has been previously added to this treeitem - the item that should be added
public void appendToNode(Item node,
Item item,
Style nodeStyle)
node - the parent node that has been previously added to this treeitem - the item that should be addednodeStyle - the stylepublic void removeAll()
public void setStyle(Style style)
FakeCustomItem
setStyle in class FakeContainerCustomItemstyle - the new style for this item.public Item[] getSelectedPath()
public java.lang.Object[] getSelectedPathAsAttributes(java.lang.Object key)
key - the key that is used for querying attributes from the focused item
UiAccess.setAttribute(Item, Object, Object),
UiAccess.getAttribute(Item, Object)
public void setSelectedPathByAttribute(java.lang.Object key,
java.lang.Object[] values)
key - the attribute keyvalues - the values that are set for each item / nodeUiAccess.setAttribute(Item, Object, Object),
UiAccess.getAttribute(Item, Object)
protected Style focus(Style focusStyle,
int direction)
FakeCustomItem
focus in class FakeContainerCustomItemfocusStyle - the style which is used to indicate the focused statedirection - the direction from which this item is focused,
either Canvas.UP, Canvas.DOWN, Canvas.LEFT, Canvas.RIGHT or 0.
When 0 is given, the direction is unknown.
public void collapseAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||