Class AbstractEntityTreeModel<M extends FilterTreeModel<Entity>>
- Type Parameters:
M- the type of the underlying tree model
- All Implemented Interfaces:
FilterTreeModel<Entity>,EntityTreeModel
A base class for EntityTreeModel implementations, based on a tree model built by a toolkit, a
javax.swing.tree.TreeModel based one for example, the entity tree logic, the queries, living here.
The FilterTreeModel methods delegate to the tree model, see treeModel().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceBuilds the underlying tree model of anEntityTreeModel.Nested classes/interfaces inherited from interface is.codion.framework.model.EntityTreeModel
EntityTreeModel.Builder<B extends EntityTreeModel.Builder<B>>Nested classes/interfaces inherited from interface is.codion.common.model.component.tree.FilterTreeModel
FilterTreeModel.Expansion<T>, FilterTreeModel.Loader<T>, FilterTreeModel.Nodes<T>, FilterTreeModel.NodesListener<T>, FilterTreeModel.VisibleNodes<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEntityTreeModel(AbstractEntityTreeModelBuilder<?> builder, AbstractEntityTreeModel.TreeModelBuilder<M> treeModel) -
Method Summary
Modifier and TypeMethodDescriptionfinal EntityConnectionfinal FilterTreeModel.Expansion<Entity> final FilterTreeModel.Nodes<Entity> nodes()The selection, over theFilterTreeModel.visible()nodes, by item, withTreeSelection.paths()addressing particular nodes, the same item appearing in several places.final FilterTreeSort<Entity> sort()toString()protected final Mvisible()
-
Constructor Details
-
AbstractEntityTreeModel
protected AbstractEntityTreeModel(AbstractEntityTreeModelBuilder<?> builder, AbstractEntityTreeModel.TreeModelBuilder<M> treeModel) - Parameters:
builder- the buildertreeModel- builds the underlying tree model
-
-
Method Details
-
connection
- Specified by:
connectionin interfaceEntityTreeModel- Returns:
- the connection used by this tree model
-
nodes
- Specified by:
nodesin interfaceFilterTreeModel<M extends FilterTreeModel<Entity>>- Returns:
- the
FilterTreeModel.Nodesproviding the structure, loading, mutation and filtering
-
expansion
- Specified by:
expansionin interfaceFilterTreeModel<M extends FilterTreeModel<Entity>>- Returns:
- the
FilterTreeModel.Expansioncontrolling the expanded nodes
-
visible
- Specified by:
visiblein interfaceFilterTreeModel<M extends FilterTreeModel<Entity>>- Returns:
- the
FilterTreeModel.VisibleNodes, the rows a view displays
-
selection
Description copied from interface:FilterTreeModelThe selection, over the
FilterTreeModel.visible()nodes, by item, withTreeSelection.paths()addressing particular nodes, the same item appearing in several places. Selecting a node hidden below a collapsed ancestor expands its ancestors, and a node not yet loaded is selected viaTreeSelection.set(NodePath).The selection is kept by path, through refreshes, filtering, sorting and expansion. A selected node hidden by collapsing one of its ancestors is replaced by its nearest visible ancestor, and one removed or excluded is dropped from the selection.
- Specified by:
selectionin interfaceFilterTreeModel<M extends FilterTreeModel<Entity>>- Returns:
- the selection
-
sort
- Specified by:
sortin interfaceFilterTreeModel<M extends FilterTreeModel<Entity>>- Returns:
- the
FilterTreeSortinstance used by this model
-
toString
-
treeModel
- Returns:
- the underlying tree model
-