Package org.teamapps.ux.component.tree
Class SimpleTreeModel<PAYLOAD>
java.lang.Object
org.teamapps.ux.model.AbstractTreeModel<BaseTemplateTreeNode<PAYLOAD>>
org.teamapps.ux.component.tree.SimpleTreeModel<PAYLOAD>
- All Implemented Interfaces:
TreeNodeInfoExtractor<BaseTemplateTreeNode<PAYLOAD>>,BaseTreeModel<BaseTemplateTreeNode<PAYLOAD>>,ComboBoxModel<BaseTemplateTreeNode<PAYLOAD>>,TreeModel<BaseTemplateTreeNode<PAYLOAD>>
public class SimpleTreeModel<PAYLOAD>
extends AbstractTreeModel<BaseTemplateTreeNode<PAYLOAD>>
implements ComboBoxModel<BaseTemplateTreeNode<PAYLOAD>>
-
Field Summary
Fields inherited from class org.teamapps.ux.model.AbstractTreeModel
onAllNodesChanged, onChangedFields inherited from interface org.teamapps.ux.component.tree.TreeNodeInfoExtractor
DEFAULT_TREE_NODE_INFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNode(BaseTemplateTreeNode<PAYLOAD> node) voidaddNodes(List<BaseTemplateTreeNode<PAYLOAD>> nodes) getChildRecords(BaseTemplateTreeNode<PAYLOAD> parentRecord) Get the child records of a node.intgetRecords(String query) voidvoidvoidremoveChildren(Collection<BaseTemplateTreeNode<PAYLOAD>> parents) voidvoidreplaceChildren(Collection<BaseTemplateTreeNode<PAYLOAD>> parentsToEmpty, List<BaseTemplateTreeNode<PAYLOAD>> nodesToAdd) voidsetMaxResultNodes(int maxResultNodes) voidsetNodes(List<BaseTemplateTreeNode<PAYLOAD>> nodes) voidMethods inherited from class org.teamapps.ux.model.AbstractTreeModel
onAllNodesChanged, onChangedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.teamapps.ux.model.TreeModel
updateNodes, updateNodesMethods inherited from interface org.teamapps.ux.component.tree.TreeNodeInfoExtractor
getTreeNodeInfo
-
Constructor Details
-
SimpleTreeModel
public SimpleTreeModel() -
SimpleTreeModel
-
-
Method Details
-
setNodes
-
addNode
-
addNodes
-
removeChildren
-
replaceChildren
public void replaceChildren(Collection<BaseTemplateTreeNode<PAYLOAD>> parentsToEmpty, List<BaseTemplateTreeNode<PAYLOAD>> nodesToAdd) -
updateNode
-
relocateNode
-
removeNode
-
removeAllNodes
public void removeAllNodes() -
getMaxResultNodes
public int getMaxResultNodes() -
setMaxResultNodes
public void setMaxResultNodes(int maxResultNodes) -
getRecords
- Specified by:
getRecordsin interfaceComboBoxModel<PAYLOAD>
-
getRecords
- Specified by:
getRecordsin interfaceTreeModel<PAYLOAD>
-
getChildRecords
public List<BaseTemplateTreeNode<PAYLOAD>> getChildRecords(BaseTemplateTreeNode<PAYLOAD> parentRecord) Description copied from interface:BaseTreeModelGet the child records of a node. This is currently only used for lazy parent nodes but might be used for other reasons later.- Specified by:
getChildRecordsin interfaceBaseTreeModel<PAYLOAD>
-