Class AbstractTreeItemModel
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractTreeItemModel
-
- All Implemented Interfaces:
TreeItemModel,Serializable
- Direct Known Subclasses:
EmptyTreeItemModel
public abstract class AbstractTreeItemModel extends Object implements TreeItemModel
A skeleton implementation ofTreeItemModelused withWTree.- Since:
- 1.1.0
- Author:
- Jonathan Austin
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.bordertech.wcomponents.TreeItemModel
TreeItemModel.ShuffleType
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeItemModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetItemId(List<Integer> row)Retrieves the rows unique item id at the given row.TreeItemImagegetItemImage(List<Integer> row)Retrieves the value at the given row.TreeItemModel.ShuffleTypegetItemShuffleType(List<Integer> row)booleanhasChildren(List<Integer> row)Allows the model to report if the row has children without actually having to determine the number of children (as it might not be known).booleanisDisabled(List<Integer> row)Indicates whether the given row is disabled.booleanisExpandable(List<Integer> row)Indicates whether the given row is expandable.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.TreeItemModel
getChildCount, getItemLabel, getRowCount
-
-
-
-
Method Detail
-
isDisabled
public boolean isDisabled(List<Integer> row)
Indicates whether the given row is disabled.- Specified by:
isDisabledin interfaceTreeItemModel- Parameters:
row- the row index- Returns:
- true if the row is disabled, false otherwise.
-
isExpandable
public boolean isExpandable(List<Integer> row)
Indicates whether the given row is expandable.- Specified by:
isExpandablein interfaceTreeItemModel- Parameters:
row- the row index- Returns:
- true if the row is expandable, false otherwise.
-
getItemImage
public TreeItemImage getItemImage(List<Integer> row)
Retrieves the value at the given row.- Specified by:
getItemImagein interfaceTreeItemModel- Parameters:
row- - the row index.- Returns:
- the value at the given row.
-
getItemId
public String getItemId(List<Integer> row)
Retrieves the rows unique item id at the given row.- Specified by:
getItemIdin interfaceTreeItemModel- Parameters:
row- - the row index.- Returns:
- the value at the given row.
-
getItemShuffleType
public TreeItemModel.ShuffleType getItemShuffleType(List<Integer> row)
- Specified by:
getItemShuffleTypein interfaceTreeItemModel- Parameters:
row- the row index- Returns:
- the shuffle type for this item
-
hasChildren
public boolean hasChildren(List<Integer> row)
Allows the model to report if the row has children without actually having to determine the number of children (as it might not be known).- Specified by:
hasChildrenin interfaceTreeItemModel- Parameters:
row- the row index- Returns:
- true if the row has children
-
-