gumbo.util.relation
Class AbstractTreeNode.Global
java.lang.Object
|
+--gumbo.util.AbstractDisposable
|
+--gumbo.util.AbstractDelegatable
|
+--gumbo.util.AbstractDelegatable.Serial
|
+--gumbo.util.relation.AbstractRelation
|
+--gumbo.util.relation.AbstractTreeNode
|
+--gumbo.util.relation.AbstractTreeNode.Auto
|
+--gumbo.util.relation.AbstractTreeNode.Global
- All Implemented Interfaces:
- Delegatable, Disposable, Relation, java.io.Serializable, TreeNode
- Enclosing class:
- AbstractTreeNode
- public static class AbstractTreeNode.Global
- extends AbstractTreeNode.Auto
An AbstractTreeNode.Auto that uses a singleton (global) relationship,
and throws an exception if the relationship is changed. This allows
a client to use tree nodes without bothering to set the relationship,
but it also means that the global relationship reports events for all
relations in the global relationship.
- See Also:
- Serialized Form
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractTreeNode.Global
public AbstractTreeNode.Global()
- Creates an instance with an uninitialized delegator and
TreeNodes.GlobalTree as the relationship. Must
call initDelegator() before using this delegate, such as
new Global().initDelegator(d)
.
AbstractTreeNode.Global
public AbstractTreeNode.Global(Relationship relationship)
- Creates an instance with an uninitialized delegator. Must
call initDelegator() before using this delegate, such as
new Global(r).initDelegator(d)
.
Master constructor.
- Parameters:
relationship
- This relation's singleton relationship.
Never null. If not a singleton this class will not
work as expected.
setRelationship
public void setRelationship(Relationship relationship)
- Description copied from interface:
Relation
- Sets the relationship that this relation belongs to. If this relation
is going dead implementors must satisfy the relation contract by
actively disconnecting it from all relations, or passively throwing
an exception. Unless otherwise noted, no change in relationship is
ignored.
- Specified by:
setRelationship
in interface Relation
- Overrides:
setRelationship
in class AbstractRelation
- Parameters:
relationship
- The relationship. Null if none (dead).
- Throws:
java.lang.UnsupportedOperationException
- This relation's
relationship is immutable.