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 booleanchangedprotected Map<String,Inventory.CounterNode>inventoryprotected List<String>pathprotected StringresultStringprotected Inventory.CounterNoderootprotected booleansortprotected List<TreeModelListener>treeModelListeners -
Constructor Summary
Constructors Constructor Description CounterInventory(Inventory.Counter c, List<String> path, boolean sort) -
Method Summary
Modifier and Type Method Description voidaddTreeModelListener(TreeModelListener l)voidfireNodesRemoved(Object[] path, int[] childIndices, Object[] children)ObjectgetChild(Object parent, int index)intgetChildCount(Object parent)intgetIndexOfChild(Object parent, Object child)StringgetResultString()Deliver information of the tree as text.String[]getResultStringArray()Compatibility for DisplayResults class.ObjectgetRoot()voidinsert(Inventory.Counter counter)insert counter into the tree.booleanisLeaf(Object node)voidremoveTreeModelListener(TreeModelListener l)voidvalueForPathChanged(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:
getChildCountin interfaceTreeModel
-
isLeaf
-
addTreeModelListener
- Specified by:
addTreeModelListenerin interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListenerin interfaceTreeModel
-
fireNodesRemoved
-
getChild
-
getIndexOfChild
- Specified by:
getIndexOfChildin interfaceTreeModel
-
valueForPathChanged
- Specified by:
valueForPathChangedin interfaceTreeModel
-