Package VASSAL.build.module
Class Inventory.CounterInventory
java.lang.Object
VASSAL.build.module.Inventory.CounterInventory
- All Implemented Interfaces:
TreeModel
- Enclosing class:
- Inventory
public class Inventory.CounterInventory extends Object implements TreeModel
-
Field Summary
Fields Modifier and Type Field Description protected boolean
changed
protected Map<String,Inventory.CounterNode>
inventory
protected List<String>
path
protected String
resultString
protected Inventory.CounterNode
root
protected boolean
sort
protected List<TreeModelListener>
treeModelListeners
-
Constructor Summary
Constructors Constructor Description CounterInventory(Inventory.Counter c, List<String> path, boolean sort)
-
Method Summary
Modifier and Type Method Description void
addTreeModelListener(TreeModelListener l)
void
fireNodesRemoved(Object[] path, int[] childIndices, Object[] children)
Object
getChild(Object parent, int index)
int
getChildCount(Object parent)
int
getIndexOfChild(Object parent, Object child)
String
getResultString()
Deliver information of the tree as text.String[]
getResultStringArray()
Compatibility for DisplayResults class.Object
getRoot()
void
insert(Inventory.Counter counter)
insert counter into the tree.boolean
isLeaf(Object node)
void
removeTreeModelListener(TreeModelListener l)
void
valueForPathChanged(TreePath path, Object newValue)
-
Field Details
-
treeModelListeners
-
inventory
-
root
-
resultString
-
path
-
changed
protected boolean changed -
sort
protected boolean sort
-
-
Constructor Details
-
CounterInventory
-
-
Method Details
-
insert
insert counter into the tree. It is not sorted in any way.- Parameters:
counter
-
-
getResultString
Deliver information of the tree as text.- Returns:
- String
-
getResultStringArray
Compatibility for DisplayResults class.- Returns:
- String[]
-
getRoot
-
getChildCount
- Specified by:
getChildCount
in interfaceTreeModel
-
isLeaf
-
addTreeModelListener
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-
fireNodesRemoved
-
getChild
-
getIndexOfChild
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
valueForPathChanged
- Specified by:
valueForPathChanged
in interfaceTreeModel
-