org.jgraph.graph

Class DefaultEdge

public class DefaultEdge extends DefaultGraphCell implements Edge

A simple implementation for an edge.
Nested Class Summary
static classDefaultEdge.DefaultRouting
static classDefaultEdge.LoopRouting
Field Summary
protected Objectsource
Source and target of the edge.
protected Objecttarget
Source and target of the edge.
Constructor Summary
DefaultEdge()
Constructs 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
Objectclone()
Create a clone of the cell.
ObjectgetSource()
Returns the source of the edge.
ObjectgetTarget()
Returns the target of the edge.
voidsetSource(Object port)
Sets the source of the edge.
voidsetTarget(Object port)
Returns the target of edge.

Field Detail

source

protected Object source
Source and target of the edge.

target

protected Object target
Source and target of the edge.

Constructor Detail

DefaultEdge

public DefaultEdge()
Constructs an empty edge.

DefaultEdge

public DefaultEdge(Object userObject)
Constructs an edge that holds a reference to the specified user object.

Parameters: userObject reference to the user object

DefaultEdge

public 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.

Parameters: userObject reference to the user object

Method Detail

clone

public Object 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.

Returns: Object a clone of this object.

getSource

public Object getSource()
Returns the source of the edge.

getTarget

public Object getTarget()
Returns the target of the edge.

setSource

public void setSource(Object port)
Sets the source of the edge.

setTarget

public void setTarget(Object port)
Returns the target of edge.
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.