Package org.jgraph.graph
Class DefaultEdge
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.jgraph.graph.DefaultGraphCell
org.jgraph.graph.DefaultEdge
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode,Edge,GraphCell
A simple implementation for an edge.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.jgraph.graph.Edge
Edge.Routing -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObjectSource and target of the edge.protected ObjectSource and target of the edge.Fields inherited from class org.jgraph.graph.DefaultGraphCell
attributesFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty edge.DefaultEdge(Object userObject) Constructs an edge that holds a reference to the specified user object.DefaultEdge(Object userObject, AttributeMap storageMap) Constructs an edge that holds a reference to the specified user object and sets default values for points and the label position. -
Method Summary
Methods inherited from class org.jgraph.graph.DefaultGraphCell
addPort, addPort, addPort, changeAttributes, getAttributes, getChildren, setAttributesMethods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgraph.graph.GraphCell
changeAttributes, getAttributes, setAttributes
-
Field Details
-
source
Source and target of the edge. -
target
Source and target of the edge.
-
-
Constructor Details
-
DefaultEdge
public DefaultEdge()Constructs an empty edge. -
DefaultEdge
Constructs an edge that holds a reference to the specified user object.- Parameters:
userObject- reference to the user object
-
DefaultEdge
Constructs an edge that holds a reference to the specified user object and sets default values for points and the label position.- Parameters:
userObject- reference to the user object
-
-
Method Details
-
getSource
Returns the source of the edge. -
getTarget
Returns the target of the edge. -
setSource
Sets the source of the edge. -
setTarget
Returns the target ofedge. -
clone
Create a clone of the cell. The cloning of the user object is deferred to the cloneUserObject() method. The source and target references are set to null.- Overrides:
clonein classDefaultGraphCell- Returns:
- Object a clone of this object.
-