edu.umd.cs.jazz
Class ZRoot

java.lang.Object
  |
  +--edu.umd.cs.jazz.ZSceneGraphObject
        |
        +--edu.umd.cs.jazz.ZNode
              |
              +--edu.umd.cs.jazz.ZGroup
                    |
                    +--edu.umd.cs.jazz.ZRoot
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, ZSerializable

public class ZRoot
extends ZGroup
implements java.io.Serializable

ZRoot extends ZNode overiding several methods of ZNode to ensure that ZRoot is always in the root position of a Scenegraph. Every scenegraph begins with a ZRoot which serves as the root of the entire scenegraph tree. Each scenegraph has exactly one root.

Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.

Author:
Ben Bederson
, Britt McAlister
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.umd.cs.jazz.ZGroup
children, childrenFindable_DEFAULT, childrenPickable_DEFAULT, childrenVolatileBoundsCache, hasOneChild_DEFAULT
 
Fields inherited from class edu.umd.cs.jazz.ZNode
editorFactory, findable_DEFAULT, parent, pickable_DEFAULT, savable_DEFAULT, selectable_DEFAULT
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, inTransaction, invalidBounds, invalidVolatileBounds, listenerList, volatileBounds, volatileBounds_DEFAULT
 
Constructor Summary
ZRoot()
           
 
Method Summary
 ZRenderContext getCurrentRenderContext()
          Return current render context.
 void setCurrentRenderContext(ZRenderContext renderContext)
          Set the current render context.
protected  void setParent(ZNode parent)
          Overrides ZNode.setParent() to throw an exception if an attempt to set the parent of a ZRoot is made.
 
Methods inherited from class edu.umd.cs.jazz.ZGroup
addChild, addChildImpl, addChildren, addChildren, addGroupListener, childAddedNotification, childRemovedNotification, computeBounds, computeVolatileBounds, dump, duplicateObject, extract, findNodes, getChild, getChildren, getChildrenFindable, getChildrenIterator, getChildrenPickable, getChildrenReference, getNumChildren, getShallowBounds, getVolatileBounds, hasOneChild, indexOf, insertAbove, iterator, lower, lowerTo, markInTransaction, markNotInTransaction, pick, raise, raiseTo, removeAllChildren, removeAllChildren, removeChild, removeChild, removeChild, removeChildImpl, removeGroupListener, removeNodeListener, render, setChildrenFindable, setChildrenPickable, setHasOneChild, setState, trimToSize, updateHasNodeListener, writeObject, writeObjectRecurse
 
Methods inherited from class edu.umd.cs.jazz.ZNode
addNodeListener, editor, getGlobalBounds, getGlobalToLocalTransform, getLocalToGlobalTransform, getParent, getRoot, globalToLocal, globalToLocal, globalToLocal, hasNodeListener, isAncestorOf, isDescendentOf, isFindable, isPickable, isSavable, isSelectable, localToGlobal, localToGlobal, localToGlobal, lower, lowerTo, percolateEventUpSceneGraph, raise, raiseTo, remove, repaint, repaint, reparent, replaceWith, setEditorFactory, setFindable, setParent, setPickable, setSavable, setSelectable, setVolatileBounds, updateBounds, updateVolatility, writeReplace
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
addClientProperty, addMouseListener, addMouseMotionListener, clone, endTransaction, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getClientProperty, getHandles, getListenerList, hasLisenerOfType, hasListenerOfType, hasMouseListener, processMouseEvent, putClientProperty, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, startTransaction, updateObjectReferences
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZRoot

public ZRoot()
Method Detail

setCurrentRenderContext

public void setCurrentRenderContext(ZRenderContext renderContext)
Set the current render context. This is meant to be used by context-sensitive objects to determine the render context while computing bounds, etc.

Parameters:
renderContext - The new render context.

getCurrentRenderContext

public ZRenderContext getCurrentRenderContext()
Return current render context. During a render, this contains the active render context. During other times, it contains the render context to be used for computing bounds by context-sensitive objects.

Returns:
the render context

setParent

protected void setParent(ZNode parent)
                  throws java.lang.RuntimeException
Overrides ZNode.setParent() to throw an exception if an attempt to set the parent of a ZRoot is made.

Parameters:
parent - parameter is not used.
java.lang.RuntimeException


Copyright � 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.