gumbo.graphic.space
Class AbstractGraphicSpaceRoot

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.relation.AbstractTreeNodeDelegator
              |
              +--gumbo.graphic.space.AbstractSpaceNode
                    |
                    +--gumbo.graphic.space.AbstractGraphicSpaceRoot
All Implemented Interfaces:
Delegatable, Disposable, Graphic, GraphicSpaceRoot, java.io.Serializable, SpaceNode

public abstract class AbstractGraphicSpaceRoot
extends AbstractSpaceNode
implements GraphicSpaceRoot

A partial implementation of the GraphicSpaceRoot interface. Wraps the tree node delegate as a root, and throws an exception if the delegator is not a GraphicSpace.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
See Also:
Serialized Form

Constructor Summary
AbstractGraphicSpaceRoot()
          Creates an instance.
 
Method Summary
 java.lang.Object getDelegator()
          Gets the delegator of this delegate, as set by initDelegator().
 Delegatable initDelegator(java.lang.Object delegator)
          Used by delegators and serialization to initialize this delegate's delegator reference.
 boolean isDelegatorInited()
          Also returns false if this object is disposed.
protected abstract  TreeNode newRootNodeDelegate()
          Called during initialization as the factory method for the tree root delegate.
protected  TreeNode newTreeNodeDelegate()
          Called during initialization as the factory method for the tree node delegate.
 
Methods inherited from class gumbo.graphic.space.AbstractSpaceNode
getGraphic, getGraphicSpaceTree
 
Methods inherited from class gumbo.util.relation.AbstractTreeNodeDelegator
getTreeNodeDelegate, implDispose
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gumbo.graphic.space.GraphicSpaceRoot
getGraphicSpaceTree
 
Methods inherited from interface gumbo.graphic.Graphic
getGraphic
 
Methods inherited from interface gumbo.util.Disposable
dispose, isDisposed
 

Constructor Detail

AbstractGraphicSpaceRoot

public AbstractGraphicSpaceRoot()
Creates an instance. Master constructor.

Method Detail

newRootNodeDelegate

protected abstract TreeNode newRootNodeDelegate()
Called during initialization as the factory method for the tree root delegate. The delegate will be wrapped as a root node.

Returns:
New uninitialized delegate with a null parent. Never null.

newTreeNodeDelegate

protected final TreeNode newTreeNodeDelegate()
Description copied from class: AbstractTreeNodeDelegator
Called during initialization as the factory method for the tree node delegate. The delegate's delegator must either be uninitialized or this object.

Specified by:
newTreeNodeDelegate in class AbstractTreeNodeDelegator
Returns:
Reference to the delegate. Never null.

initDelegator

public Delegatable initDelegator(java.lang.Object delegator)
Description copied from interface: Delegatable
Used by delegators and serialization to initialize this delegate's delegator reference. Re-initialization with the same value is allowed. Throws an exception if initialization fails for any reason.

Specified by:
initDelegator in interface GraphicSpaceRoot

isDelegatorInited

public final boolean isDelegatorInited()
Also returns false if this object is disposed.

Specified by:
isDelegatorInited in interface Delegatable
Returns:
The result.

getDelegator

public final java.lang.Object getDelegator()
Description copied from interface: Delegatable
Gets the delegator of this delegate, as set by initDelegator(). Throws an exception if isDelegatorInited() is false.

Specified by:
getDelegator in interface GraphicSpaceRoot
Returns:
The graphic space delegator (GraphicSpace). Never null.