|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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.ZVisualGroup | +--edu.umd.cs.jazz.ZAnchorGroup
ZAnchorGroup holds the information for a spatial hyperlink. An anchor represents a hyperlink from its children to an internally specified destination. Anchors can link to either another node, or to a bounds. There is an associated event handler ZLinkEventHandler that provides interaction for specifying these links.
ZAnchorGroup indicates the link with a visual component that can be defined by extending this class and overriding createLinkComponent. By default, it creates an arrow pointing to the destination of the link.
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.
ZLinkEventHandler
, Serialized FormFields inherited from class edu.umd.cs.jazz.ZVisualGroup |
visualComponentPickable_DEFAULT |
Fields inherited from class edu.umd.cs.jazz.ZGroup |
children, childrenFindable_DEFAULT, childrenPickable_DEFAULT, hasOneChild_DEFAULT |
Fields inherited from class edu.umd.cs.jazz.ZNode |
findable_DEFAULT, pickable_DEFAULT, savable_DEFAULT, selectable_DEFAULT |
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
bounds, listenerList, volatileBounds, volatileBounds_DEFAULT |
Constructor Summary | |
ZAnchorGroup()
Constructs a new ZAnchorGroup |
|
ZAnchorGroup(ZNode child)
Constructs a new link group node with the specified node as a child of the new group. |
Method Summary | |
void |
computeBounds()
Trap computeBounds requests as it indicates that the anchor source has changed, and the visual link needs to be updated. |
protected ZVisualComponent |
createLinkComponent()
Internal method to create the visual component that represents the link. |
java.lang.String |
dump()
Generate a string that represents this object for debugging. |
protected java.lang.Object |
duplicateObject()
Returns a clone of this object. |
void |
finalize()
Disposes of this anchor group when it is no longer used. |
void |
follow(ZCamera camera)
Follow the link, animating the viewpoint in the specified camera to the link destination. |
java.awt.geom.Rectangle2D |
getDestBounds()
Determine the bounds that are the destination of this link. |
ZNode |
getDestNode()
Determine the node that is the destination of this link. |
boolean |
hasDestination()
Determine if this ZAnchorGroup has a destination to link to. |
boolean |
isVisible()
Determine if the visual depiction of this link is currently visible. |
void |
setDestBounds(java.awt.geom.Rectangle2D bounds,
ZCamera camera)
Set the bounds destination of this link. |
void |
setDestNode(ZNode node,
ZCamera camera)
Set the node destination of this link. |
void |
setDestPt(java.awt.geom.Point2D pt)
Set the destination point of the link for purposes of visually indicating the link. |
void |
setSrcPt(java.awt.geom.Point2D pt)
Set the source point of the link for purposes of visually indicating the link. |
void |
setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
Set some state of this object as it gets read back in. |
void |
setVisible(boolean visible,
ZCamera camera)
Specify whether the visual depiction of this link should be visible or not. |
void |
updateLinkComponent(ZCamera camera)
Update the visual component that represents the link. |
protected void |
updateObjectReferences(ZObjectReferenceTable objRefTable)
Called to update internal object references after a clone operation by ZSceneGraphObject.clone() . |
void |
writeObject(ZObjectOutputStream out)
Write out all of this object's state. |
void |
writeObjectRecurse(ZObjectOutputStream out)
Specify which objects this object references in order to write out the scenegraph properly |
Methods inherited from class edu.umd.cs.jazz.ZNode |
addClientProperty, addNodeListener, editor, getClientProperty, getGlobalBounds, getGlobalToLocalTransform, getLocalToGlobalTransform, getParent, getRoot, globalToLocal, globalToLocal, hasNodeListener, isAncestorOf, isDescendentOf, isFindable, isPickable, isSavable, isSelectable, localToGlobal, localToGlobal, lower, lowerTo, percolateEventUpSceneGraph, putClientProperty, raise, raiseTo, remove, repaint, repaint, repaint, reparent, replaceWith, setEditorFactory, setFindable, setParent, setPickable, setSavable, setSelectable, updateBounds, writeReplace |
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
addMouseListener, addMouseMotionListener, clone, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getListenerList, hasLisenerOfType, hasMouseListener, processMouseEvent, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZAnchorGroup()
public ZAnchorGroup(ZNode child)
child
- Child of the new group node.Method Detail |
protected java.lang.Object duplicateObject()
duplicateObject
in class ZVisualGroup
ZSceneGraphObject.duplicateObject()
protected void updateObjectReferences(ZObjectReferenceTable objRefTable)
ZSceneGraphObject.clone()
.updateObjectReferences
in class ZNode
ZSceneGraphObject.updateObjectReferences(edu.umd.cs.jazz.util.ZObjectReferenceTable)
public void finalize()
finalize
in class java.lang.Object
public ZNode getDestNode()
public void setDestNode(ZNode node, ZCamera camera)
node
- The node that is the destination of this link.camera
- The camera the link is going to be primarily viewed within. This is used to determine the appropriate visual display of the link.setDestBounds(java.awt.geom.Rectangle2D, edu.umd.cs.jazz.ZCamera)
public java.awt.geom.Rectangle2D getDestBounds()
public void setDestBounds(java.awt.geom.Rectangle2D bounds, ZCamera camera)
bounds
- The bounds (in global coordinates) that is the destination of this link.camera
- The camera the link is going to be primarily viewed within. This is used to determine the appropriate visual display of the link.setDestNode(edu.umd.cs.jazz.ZNode, edu.umd.cs.jazz.ZCamera)
public void computeBounds()
computeBounds
in class ZVisualGroup
protected ZVisualComponent createLinkComponent()
public void setSrcPt(java.awt.geom.Point2D pt)
pt
- The source point in global coordinatespublic void setDestPt(java.awt.geom.Point2D pt)
pt
- The destination point in global coordinatespublic void updateLinkComponent(ZCamera camera)
camera
- The camera the link is going to be primarily viewed within. This is used to determine the appropriate visual display of the link.public void setVisible(boolean visible, ZCamera camera)
visible
- True if the link should be shown, or false otherwise.camera
- The camera the link is going to be primarily viewed within. This is used to determine the appropriate visual display of the link.public boolean isVisible()
public void follow(ZCamera camera)
camera
- The camera to animatepublic java.lang.String dump()
dump
in class ZGroup
ZDebug.dump(edu.umd.cs.jazz.ZNode)
public void writeObject(ZObjectOutputStream out) throws java.io.IOException
writeObject
in interface ZSerializable
writeObject
in class ZVisualGroup
out
- The stream that this object writes intopublic void writeObjectRecurse(ZObjectOutputStream out) throws java.io.IOException
writeObjectRecurse
in interface ZSerializable
writeObjectRecurse
in class ZVisualGroup
out
- The stream that this object writes intopublic void setState(java.lang.String fieldType, java.lang.String fieldName, java.lang.Object fieldValue)
setState
in interface ZSerializable
setState
in class ZVisualGroup
fieldType
- The fully qualified type of the fieldfieldName
- The name of the fieldfieldValue
- The value of the fieldpublic boolean hasDestination()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |