public interface StructureBeanNode extends TableData
StructureBean.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PARENT_OBJECT_ID_KEY
The parent node's object ID is bound to this key (parent::id).
|
static java.lang.String |
PARENT_RELATIONSHIP_ID_KEY
The parent node's relationship ID is bound to this key (
parent::id[connection]).
|
OBJECT_ID_KEY, RELATIONSHIP_ID_KEY| Modifier and Type | Method and Description |
|---|---|
void |
accept(StructureBeanNodeVisitor visitor)
Visits this node and all children.
|
void |
addChild(StructureBeanNode child)
Adds a child node.
|
void |
addChild(StructureBeanNode child,
int index)
Adds a child node at the given index within the child array
|
StructureBeanNode |
copy(StructureBeanNode parent,
TableBeanProxy table)
Create a copy of this node and its decendants.
|
void |
expunge()
This method is called by the
structure
implementation to expunge a node that isn't being used by the structure
no more. |
StructureBeanNode |
getChildAt(int index)
Returns the child node at the specified index.
|
int |
getChildCount()
Returns the child count.
|
int |
getChildIndex(StructureBeanNode child)
Returns the index of the specified child, or -1 if the child in
fact isn't a child to this node.
|
java.util.Iterator<StructureBeanNode> |
getChildNodes()
Returns all child nodes.
|
java.util.Iterator<StructureBeanNode> |
getChildNodes(java.lang.String relationshipId,
java.lang.String objectId,
boolean from)
Returns all child nodes that match the given relationship ID, object ID
and direction.
|
StructureBeanNode |
getDescendantAt(int index)
Returns the descendant at the specified index.
|
int |
getDescendantCount()
Returns the count of descendant nodes.
|
java.util.Iterator<StructureBeanNode> |
getDescendantNodes()
Returns all descendant nodes.
|
int |
getIndex()
Returns the index of this node within the structure
|
int |
getLevel()
Returns the level of this node
|
StructureBeanNode |
getParent()
Returns the node's parent node.
|
boolean |
hasChildren()
Returns true if the node has any children.
|
boolean |
hasDescendant()
Returns whether the node has any descendant nodes or not.
|
boolean |
hasParent()
Returns true if the node has a parent node.
|
boolean |
isAncestor(StructureBeanNode node)
Returns true if the specified node is an ancestor of the node.
|
boolean |
isChild(StructureBeanNode child)
Returns true if the specified node is a child to this node.
|
boolean |
isDescendant(StructureBeanNode descendant)
Returns true if the specified node is a descendant of this node.
|
boolean |
isExpandable() |
boolean |
isExpanded()
Returns true if the node is expanded.
|
boolean |
isExpunged()
Returns whether the node has been expunged or not.
|
boolean |
isFirstChild(StructureBeanNode child)
Returns true if the specified node is this node's first child.
|
boolean |
isFrom()
Returns true if the relationship between the node and it's
parent is in the from direction (i.e., the relationship is going
from the parent to the child node).
|
boolean |
isLastChild(StructureBeanNode child)
Returns true if the specified node is this node's last child.
|
boolean |
isParent(StructureBeanNode node)
Returns true if the specified node is the node's parent node.
|
boolean |
isStructureValid()
Returns true if the structure below the node is valid or not.
|
boolean |
removeChild(StructureBeanNode child)
Removes a child node.
|
boolean |
removeChildNodes()
Removes all child nodes.
|
boolean |
removeChildNodes(boolean expunge)
Removes all child nodes.
|
void |
setExpandable(boolean expandable)
Sets whether this node is expandable or not.
|
void |
setExpanded(boolean expanded)
Sets whether the node is expanded or not.
|
void |
setFrom(boolean from)
Sets whether the relationship between the node and it's parent is in the
from direction or not.
|
void |
setParent(StructureBeanNode parent)
Sets the node's parent node.
|
void |
setStructureValid(boolean structureValid)
Sets whether the structure below the node is valid or not.
|
void |
sortChildNodes(java.util.Comparator<? super StructureBeanNode> comparator)
Sorts the child nodes using the specified java.util.Comparator.
|
accept, copy, getCell, getCell, getCell, getData, getId, getObjectId, getRelationshipId, getRow, isEvaluationRequired, putData, setEvaluationRequired, setObjectId, setRelationshipIdisHighlighted, isNavigable, isSelectable, isSelected, isVisible, setHighlighted, setNavigable, setRow, setSelectable, setSelected, setVisiblestatic final java.lang.String PARENT_OBJECT_ID_KEY
static final java.lang.String PARENT_RELATIONSHIP_ID_KEY
boolean isFrom()
setFrom(boolean)void setFrom(boolean from)
isFrom()boolean isExpanded()
setExpanded(boolean)boolean isExpandable()
void setExpandable(boolean expandable)
expandable - False if the node isn't expandable nor collapsablevoid setExpanded(boolean expanded)
setExpanded(boolean)boolean isStructureValid()
structure when it's validate(Map) method
is invoked.setStructureValid(boolean)void setStructureValid(boolean structureValid)
isStructureValid()void setParent(StructureBeanNode parent)
StructureBeanNode getParent()
boolean hasParent()
boolean isParent(StructureBeanNode node)
boolean isAncestor(StructureBeanNode node)
void addChild(StructureBeanNode child)
void addChild(StructureBeanNode child, int index)
boolean removeChild(StructureBeanNode child)
boolean removeChildNodes()
boolean removeChildNodes(boolean expunge)
expunge - Whether to expunge the child nodes being removed.boolean isChild(StructureBeanNode child)
boolean isFirstChild(StructureBeanNode child)
boolean isLastChild(StructureBeanNode child)
StructureBeanNode getChildAt(int index)
int getChildIndex(StructureBeanNode child)
java.util.Iterator<StructureBeanNode> getChildNodes()
java.util.Iterator<StructureBeanNode> getChildNodes(java.lang.String relationshipId, java.lang.String objectId, boolean from)
relationshipId - The relationship ID.objectId - The object ID.from - Whether the direction is from this node to the children.int getChildCount()
int getLevel()
int getIndex()
boolean hasChildren()
void sortChildNodes(java.util.Comparator<? super StructureBeanNode> comparator)
boolean isDescendant(StructureBeanNode descendant)
isChild(StructureBeanNode)StructureBeanNode getDescendantAt(int index)
NODE
|
|---- DESCENDANT[index=0]
| |
| |---- DESCENDANT[1]
|
|---- DESCENDANT[2]
| |
| |---- DESCENDANT[3]
| |
| |---- DESCENDANT[4]
| |
| |---- DESCENDANT[5]
|
|---- DESCENDANT[6]
getChildAt(int)java.util.Iterator<StructureBeanNode> getDescendantNodes()
getChildNodes()int getDescendantCount()
getChildCount()boolean hasDescendant()
hasChildren()
method.hasChildren()void expunge()
structure
implementation to expunge a node that isn't being used by the structure
no more. The purpose of this method is to make any resources held by the
node (including any resources held by descendant nodes) available for
garbage collection.isExpunged()boolean isExpunged()
expunge()StructureBeanNode copy(StructureBeanNode parent, TableBeanProxy table)
parent - The parent node.table - The table.void accept(StructureBeanNodeVisitor visitor)
visitor - The visitor.Copyright ? Technia AB. All Rights Reserved.