Interface TreeItemModel
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractTreeItemModel
,EmptyTreeItemModel
public interface TreeItemModel extends Serializable
Provides the data and details of the tree items used in aWTree
.- Since:
- 1.1.0
- Author:
- Jonathan Austin
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TreeItemModel.ShuffleType
A type to indicate how a tree item can be shuffled.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getChildCount(List<Integer> row)
Retrieves the number of children a row has.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.String
getItemLabel(List<Integer> row)
Retrieves the label at the given row.TreeItemModel.ShuffleType
getItemShuffleType(List<Integer> row)
int
getRowCount()
Retrieves the number of rows for the root (ie top) level.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.
-
-
-
Method Detail
-
isDisabled
boolean isDisabled(List<Integer> row)
Indicates whether the given row is disabled.- Parameters:
row
- the row index- Returns:
- true if the row is disabled, false otherwise.
-
getItemLabel
String getItemLabel(List<Integer> row)
Retrieves the label at the given row.- Parameters:
row
- - the row index.- Returns:
- the value at the given row.
-
getItemId
String getItemId(List<Integer> row)
Retrieves the rows unique item id at the given row.- Parameters:
row
- - the row index.- Returns:
- the value at the given row.
-
getItemImage
TreeItemImage getItemImage(List<Integer> row)
Retrieves the value at the given row.- Parameters:
row
- - the row index.- Returns:
- the value at the given row.
-
getItemShuffleType
TreeItemModel.ShuffleType getItemShuffleType(List<Integer> row)
- Parameters:
row
- the row index- Returns:
- the shuffle type for this item
-
isExpandable
boolean isExpandable(List<Integer> row)
Indicates whether the given row is expandable.- Parameters:
row
- the row index- Returns:
- true if the row is expandable, false otherwise.
-
getRowCount
int getRowCount()
Retrieves the number of rows for the root (ie top) level.- Returns:
- the number of rows in the model for the root (ie top) level.
-
hasChildren
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).- Parameters:
row
- the row index- Returns:
- true if the row has children
-
-