Class AbstractTreeNode.Auto

All Implemented Interfaces:
Delegatable, Disposable, Relation,, TreeNode
Direct Known Subclasses:
Enclosing class:

public static class AbstractTreeNode.Auto
extends AbstractTreeNode

An AbstractTreeNode that automatically sets the relationship of relations (parent or child) when a connection is created, with the dead relation taking on the relationship of the live one. When a connection is destroyed, the relationship of the relations remains unchanged. As with AbstractTreeNode, the default behavior of making this relation dead (setting relationship null) is to dispose it.

See Also:
Serialized Form

Nested Class Summary
Nested classes inherited from class gumbo.util.relation.AbstractTreeNode
AbstractTreeNode.Auto, AbstractTreeNode.Global
Nested classes inherited from class gumbo.util.AbstractDelegatable
Constructor Summary
AbstractTreeNode.Auto(Relationship relationship)
          Creates an instance with an uninitialized delegator.
Method Summary
protected  void checkAddChild(TreeNode childR)
          Called by the system before adding a child to this parent.
Methods inherited from class gumbo.util.relation.AbstractTreeNode
addChild, addChild, checkChild, checkParent, checkRemoveChild, checkSetParent, findTreeNode, getChildren, getChildrenGroup, getParent, getTreeNode, hasChildren, implDispose, implReadConnections, implSetParent, implWriteConnections, newChildrenStore, removeChild, toString
Methods inherited from class gumbo.util.relation.AbstractRelation
canFindRelation, checkClearedRelationship, checkRelation, checkSettingRelationship, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, initedDelegator, setRelationship
Methods inherited from class gumbo.util.AbstractDelegatable
getDelegator, initDelegator, initingDelegator, isDelegatorInited
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gumbo.util.relation.Relation
canFindRelation, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, setRelationship
Methods inherited from interface gumbo.util.Disposable
dispose, isDisposed
Methods inherited from interface gumbo.util.Delegatable
getDelegator, initDelegator, isDelegatorInited

Constructor Detail


public AbstractTreeNode.Auto(Relationship relationship)
Creates an instance with an uninitialized delegator. Must call initDelegator() before using this delegate, such as new AbstractTreeNode(r).initDelegator(d).

relationship - This relation's relationship. Null if none (a dead relation).
Method Detail


protected void checkAddChild(TreeNode childR)
Description copied from class: AbstractTreeNode
Called by the system before adding a child to this parent. The default implementation calls checkRelation() first, checkChild() last, and inbetween it throws an exception if child is null, child is this parent node, child has a parent, or if parent and child are not in the same relationship.

checkAddChild in class AbstractTreeNode
childR - Child relation. Possibly null or duplicate.