public final class TreeItem extends Object implements Serializable
ui::TreeItem
record.Modifier and Type | Field and Description |
---|---|
Variant.RecordVariant |
record
The
ui::TreeItem record itself, not null. |
Constructor and Description |
---|
TreeItem(Variant.RecordVariant record,
UIComponent owner) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<TreeItem> |
getChildren()
Returns the children of this tree item.
|
Object |
getData()
Returns the value of the
ui::TreeItem.data property. |
Variant<Object> |
getDataVariant() |
String |
getLocalizedLabel()
Returns the localized label.
|
int |
hashCode() |
boolean |
isExpanded()
Returns the value of the
ui::TreeItem.expanded property. |
boolean |
isLeaf()
Checks if this tree item is leaf.
|
boolean |
maybeContainsChildren()
Quickly guesses if this tree item is a leaf or not.
|
void |
setExpanded(boolean expanded) |
String |
toString() |
static List<TreeItem> |
toTreeItems(Variant.CollectionVariant<? extends Collection<RecordHolder>,RecordHolder> treeItems,
UIComponent owner) |
public final Variant.RecordVariant record
ui::TreeItem
record itself, not null.public TreeItem(Variant.RecordVariant record, UIComponent owner)
public Object getData()
ui::TreeItem.data
property.public String getLocalizedLabel()
ui::TreeItem.label
, localized, may be null.public boolean isExpanded()
ui::TreeItem.expanded
property.public void setExpanded(boolean expanded)
public List<TreeItem> getChildren()
ui::TreeItem.children
property is null - in such case
it also fills the ui::TreeItem.children
property.public boolean maybeContainsChildren()
cachedChildren
and record.children to see whether we can quickly determine whether we are leaf.public boolean isLeaf()
getChildren()
which may in turn run the "children" closure.public static List<TreeItem> toTreeItems(Variant.CollectionVariant<? extends Collection<RecordHolder>,RecordHolder> treeItems, UIComponent owner)
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.