Jazz API Documentation

edu.umd.cs.jazz
Class ZLayerGroup

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

public class ZLayerGroup
extends ZGroup
implements ZSerializable, java.io.Serializable

ZLayerGroup is a group node that can be a paint start point of a camera.

See Also:
Serialized Form

Fields inherited from class edu.umd.cs.jazz.ZGroup
childrenFindable_DEFAULT, childrenPickable_DEFAULT, hasOneChild_DEFAULT
 
Fields inherited from class edu.umd.cs.jazz.ZNode
findable_DEFAULT, listenerList, pickable_DEFAULT, savable_DEFAULT
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, objRefTable, volatileBounds_DEFAULT
 
Constructor Summary
ZLayerGroup()
          Constructs a new ZLayerGroup.
ZLayerGroup(ZNode child)
          Constructs a new layer group node with the specified node as a child of the new group.
 
Method Summary
 java.lang.Object clone()
          Duplicates the current node by using the copy constructor.
 void duplicateObject(ZLayerGroup refNode)
          Copies all object information from the reference object into the current object.
 void repaint()
          Repaint causes the portions of the surfaces that this object appears in to be marked as needing painting, and queues events to cause those areas to be painted.
 void repaint(ZBounds repaintBounds)
          Method to pass repaint methods up the tree, and to any cameras looking here.
 void trimToSize()
          Trims the capacity of the array that stores the cameras list points to the actual number of points.
 
Methods inherited from class edu.umd.cs.jazz.ZGroup
addChild, addGroupListener, computeBounds, dump, duplicateObject, fireGroupEvent, getChild, getChildren, getChildrenFindable, getChildrenIterator, getChildrenPickable, getNumChildren, hasOneChild, indexOf, insertAbove, lower, lowerTo, pick, raise, raiseTo, remove, removeChild, removeGroupListener, render, setChildrenFindable, setChildrenPickable, setHasOneChild, setState, updateVolatility, writeObject, writeObjectRecurse
 
Methods inherited from class edu.umd.cs.jazz.ZNode
addClientProperty, addMouseListener, addMouseMotionListener, duplicateObject, editor, fireMouseEvent, getClientProperty, getGlobalBounds, getGlobalToLocalTransform, getLocalToGlobalTransform, getParent, getRoot, globalToLocal, globalToLocal, hasMouseListener, isAncestorOf, isDescendentOf, isFindable, isPickable, isSavable, localToGlobal, localToGlobal, lower, lowerTo, putClientProperty, raise, raiseTo, removeMouseListener, removeMouseMotionListener, reparent, replaceWith, setEditorFactory, setFindable, setParent, setPickable, setSavable, updateBounds, updateObjectReferences, writeReplace
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
duplicateObject, getBounds, getVolatileBounds, reshape, setVolatileBounds
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZLayerGroup

public ZLayerGroup()
Constructs a new ZLayerGroup. The node must be attached to a live scenegraph (a scenegraph that is currently visible) order for it to be visible.

ZLayerGroup

public ZLayerGroup(ZNode child)
Constructs a new layer group node with the specified node as a child of the new group.
Parameters:
child - Child of the new group node.
Method Detail

duplicateObject

public void duplicateObject(ZLayerGroup refNode)
Copies all object information from the reference object into the current object. This method is called from the clone method. All ZSceneGraphObjects objects contained by the object being duplicated are duplicated, except parents which are set to null. This results in the sub-tree rooted at this object being duplicated.
Parameters:
refNode - The reference node to copy

clone

public java.lang.Object clone()
Duplicates the current node by using the copy constructor. The portion of the reference node that is duplicated is that necessary to reuse the node in a new place within the scenegraph, but the new node is not inserted into any scenegraph. The node must be attached to a live scenegraph (a scenegraph that is currently visible) or be registered with a camera directly in order for it to be visible.

In particular, for a layer group, the cameras pointing at this node are not copied. Rather, the layer must be manually added to a specific camera.

Overrides:
clone in class ZGroup
Returns:
A copy of this node.
See Also:
ZNode.updateObjectReferences(edu.umd.cs.jazz.util.ZObjectReferenceTable)

trimToSize

public void trimToSize()
Trims the capacity of the array that stores the cameras list points to the actual number of points. Normally, the cameras list arrays can be slightly larger than the number of points in the cameras list. An application can use this operation to minimize the storage of a cameras list.
Overrides:
trimToSize in class ZGroup

repaint

public void repaint()
Repaint causes the portions of the surfaces that this object appears in to be marked as needing painting, and queues events to cause those areas to be painted. The painting does not actually occur until those events are handled. If this object is visible in multiple places because more than one camera can see this object, then all of those places are marked as needing painting.

Scenegraph objects should call repaint when their internal state has changed and they need to be redrawn on the screen.

Important note : Scenegraph objects should call reshape() instead of repaint() if the internal state change effects the bounds of the shape in any way (e.g. changing penwidth, selection, transform, adding points to a line, etc.)

Overrides:
repaint in class ZNode
See Also:
ZSceneGraphObject.reshape()

repaint

public void repaint(ZBounds repaintBounds)
Method to pass repaint methods up the tree, and to any cameras looking here. Repaints only the sub-portion of this object specified by the given ZBounds. Note that the input parameter may be modified as a result of this call.
Overrides:
repaint in class ZNode
Parameters:
repaintBounds - The bounds to repaint

Jazz API Documentation