|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.ZSceneGraphObject | +--edu.umd.cs.jazz.ZNode | +--edu.umd.cs.jazz.ZGroup | +--edu.umd.cs.jazz.ZHandleGroup
ZHandleGroup is a group node that manages a collection of ZHandle
s. This collection is created by calling getHandles
on the bottom most node of the edit group that the handle group is part of. Generally to create custom handles you should just override the getHandles
method in your custom scene graph object. See ZRectangle
for an example of how to do this.
ZSceneGraphEditor
provides a convenience mechanism to locate, create and manage nodes of this type.
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.
ZHandle
, Serialized FormField 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 | |
ZHandleGroup() Constructs an empty ZHandleGroup. |
|
ZHandleGroup(ZNode child) Constructs a new handle group node with the specified node as a child of the new group. |
Method Summary | |
protected void |
addHandle(ZHandle aHandle) Add a new handle to this group. |
void |
clearHandles() Remove all handles from this handle group. |
void |
computeBounds() Recomputes and caches the bounds for this handle group, including the bounds of the handles that it is managing. |
ZHandleEventHandler |
getEventHandler() Get the event handler used internally by handle groups to dispatch events to their handles. |
java.util.Collection |
getHandles() Return the collection of handles that this handle group is managing. |
boolean |
pick(java.awt.geom.Rectangle2D rect, ZSceneGraphPath aPath) Returns the first object under the specified rectangle (if there is one) in the subtree rooted with this as searched in reverse (front-to-back) order. |
void |
processMouseEvent(ZMouseEvent e) Dispatch all events received by the handler group to the handle event handler. |
void |
refreshHandles() Clears all the handles from this handle group and then adds a new set of handles created by the underlying node that this handle group is decorating. |
void |
relocateHandles() The location of handles depends on the geometry of the underlying scene graph object that they are operating on. |
protected void |
removeHandle(ZHandle aHandle) Removes a handle from this group. |
void |
render(ZRenderContext aRenderContext) Renders this handle group along with its handles. |
static void |
setDefaultEventHandler(ZHandleEventHandler aEventHandler) Set the default event handler used by ZHandleGroups to dispatch events to their ZHandles. |
void |
setEventHandler(ZHandleEventHandler aEventHandler) Set the event handler used internally by handle groups to dispatch events to their handles. |
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZHandleGroup()
public ZHandleGroup(ZNode child)
child
- Child of the new group node.Method Detail |
public static void setDefaultEventHandler(ZHandleEventHandler aEventHandler)
public void setEventHandler(ZHandleEventHandler aEventHandler)
public ZHandleEventHandler getEventHandler()
protected void addHandle(ZHandle aHandle)
getHandles
method in the scene graph object that the handle group is decorating.
public void clearHandles()
refreshHandles
.
public void computeBounds()
computeBounds
in class ZGroup
public java.util.Collection getHandles()
getHandles
method.
getHandles
in class ZSceneGraphObject
public boolean pick(java.awt.geom.Rectangle2D rect, ZSceneGraphPath aPath)
pick
in class ZGroup
rect
- Coordinates of pick rectangle in local coordinatesaPath
- The path through the scenegraph to the picked node. Modified by this call.ZDrawingSurface.pick(int, int)
public void relocateHandles()
public void refreshHandles()
protected void removeHandle(ZHandle aHandle)
clearHandles
.
public void render(ZRenderContext aRenderContext)
render
in class ZGroup
aRenderContext
- The graphics context to use for rendering.public void processMouseEvent(ZMouseEvent e)
processMouseEvent
in class ZSceneGraphObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |