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 ofTreeItemModel
used 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 String
getItemId(List<Integer> row)
Retrieves the rows unique item id at the given row.TreeItemImage
getItemImage(List<Integer> row)
Retrieves the value at the given row.TreeItemModel.ShuffleType
getItemShuffleType(List<Integer> row)
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).boolean
isDisabled(List<Integer> row)
Indicates whether the given row is disabled.boolean
isExpandable(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:
isDisabled
in 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:
isExpandable
in 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:
getItemImage
in 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:
getItemId
in interfaceTreeItemModel
- Parameters:
row
- - the row index.- Returns:
- the value at the given row.
-
getItemShuffleType
public TreeItemModel.ShuffleType getItemShuffleType(List<Integer> row)
- Specified by:
getItemShuffleType
in 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:
hasChildren
in interfaceTreeItemModel
- Parameters:
row
- the row index- Returns:
- true if the row has children
-
-