public abstract class AbstractTreeStructure
extends java.lang.Object
Constructor and Description |
---|
AbstractTreeStructure() |
Modifier and Type | Method and Description |
---|---|
ActionCallback |
asyncCommit() |
static ActionCallback |
asyncCommitDocuments(Project project) |
abstract void |
commit() |
abstract NodeDescriptor |
createDescriptor(java.lang.Object element,
NodeDescriptor parentDescriptor) |
abstract java.lang.Object [] |
getChildElements(java.lang.Object element) |
LeafState |
getLeafState(java.lang.Object element) |
abstract java.lang.Object |
getParentElement(java.lang.Object element) |
abstract java.lang.Object |
getRootElement() |
abstract boolean |
hasSomethingToCommit() |
boolean |
isAlwaysLeaf(java.lang.Object element) |
boolean |
isToBuildChildrenInBackground(java.lang.Object element) |
boolean |
isValid(java.lang.Object element) |
<any> |
revalidateElement(java.lang.Object element) |
public abstract java.lang.Object getRootElement()
public abstract java.lang.Object [] getChildElements(java.lang.Object element)
public abstract java.lang.Object getParentElement(java.lang.Object element)
public abstract NodeDescriptor createDescriptor(java.lang.Object element, NodeDescriptor parentDescriptor)
public abstract void commit()
public abstract boolean hasSomethingToCommit()
public static ActionCallback asyncCommitDocuments(Project project)
public ActionCallback asyncCommit()
ActionCallback.setDone()
when the tree structure is committed.
By default it just calls commit()
synchronously but it is desirable to override it
to provide asynchronous commit to the tree structure to make it more responsible.
E.g. when you should commit all documents during the commit()
,
you can use asyncCommitDocuments(Project)
to do it asynchronously.public boolean isToBuildChildrenInBackground(java.lang.Object element)
public boolean isValid(java.lang.Object element)
public LeafState getLeafState(java.lang.Object element)
element
- an object that represents a node in this tree structureLeafState.Supplier#getLeafState()
public boolean isAlwaysLeaf(java.lang.Object element)
public <any> revalidateElement(java.lang.Object element)