|
Eclipse Draw2d 3.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.graph.Edge
A directed Edge joining a source and target Node. Edges indicate the dependencies between nodes. An Edge provides the information needed to perform a graph layout, and it stores the result of the layout in its various field. Therefore, it functions both as input and output. The input data consists of:
source
- the source Node
target
- the target Node
delta
- the minimum number of rows the edge should span
weight
- a hint indicating this edge's importance
width
- the edge's width
padding
- the amount of space to leave on either side of the edge
offsetSource
] - the edge's attachment point at the source node
offsetTarget
] - the edge's attachment point at the target node
The output of a layout consists of bending longer edges, and potentially inverting edges to remove cycles in the graph. The output consists of:
vNodes
- the virtual nodes (if any) which make up the bendpoints
isFeedback
- true
if the edge points backwards
Field Summary | |
Object |
data
An arbitrary data field for use by clients. |
int |
delta
Deprecated. use accessors instead |
Point |
end
Deprecated. use getPoints() |
boolean |
isFeedback
Deprecated. INTERNAL field, use accessor method Indicates an edge was inverted during the layout |
int |
offsetSource
Deprecated. use accessors instead |
int |
offsetTarget
Deprecated. use accessors instead |
int |
padding
Deprecated. use accessors instead |
Node |
source
The source Node. |
Point |
start
Deprecated. use getPoints() |
Node |
target
The target Node. |
NodeList |
vNodes
The virtual nodes used to bend edges which go across one or more ranks. |
int |
weight
A hint indicating how straight and short the edge should be relative to other edges in the graph. |
int |
width
Deprecated. use accessors instead |
Constructor Summary | |
Edge(Node source,
Node target)
Constructs a new edge with the given source and target nodes. |
|
Edge(Node source,
Node target,
int delta,
int weight)
Constructs a new edge with the given source, target, delta, and weight. |
|
Edge(Object data,
Node source,
Node target)
Constructs a new edge with the given data object, source, and target node. |
Method Summary | |
int |
getDelta()
Returns the delta value. |
int |
getLength()
For internal use only. |
int |
getPadding()
|
PointList |
getPoints()
Returns the path connecting the edge's source and target. |
int |
getSourceOffset()
Returns the effective source offset for this edge. |
int |
getTargetOffset()
Returns the effective target offset for this edge. |
int |
getWidth()
|
void |
invert()
Swaps the source and target nodes. |
boolean |
isFeedback()
Returns true if the edge was a feedback edge. |
Node |
opposite(Node end)
For internal use only. |
void |
setDelta(int delta)
Sets the delta value. |
void |
setPadding(int padding)
Sets the padding for this edge. |
void |
setSource(Node node)
Sets the source node and adds this edge to the new source's outgoing edges. |
void |
setSourceOffset(int offset)
|
void |
setTarget(Node node)
Sets the target node and adds this edge to the new target's incoming edges. |
void |
setTargetOffset(int offset)
|
void |
setWidth(int width)
Sets the width of the edge. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Object data
public int delta
public Point end
getPoints()
public boolean isFeedback
public int offsetSource
outgoing
attachment point.
public int offsetTarget
incoming
attachment point.
public int padding
public Node source
public Point start
getPoints()
public Node target
public NodeList vNodes
public int weight
1
.
public int width
Constructor Detail |
public Edge(Node source, Node target)
source
- the source Nodetarget
- the target Nodepublic Edge(Node source, Node target, int delta, int weight)
source
- the source Nodetarget
- the target Nodedelta
- the minimum edge spanweight
- the weight hintpublic Edge(Object data, Node source, Node target)
data
- an arbitrary data objectsource
- the source nodetarget
- the target nodeMethod Detail |
public int getDelta()
public int getLength()
public int getPadding()
public PointList getPoints()
public int getSourceOffset()
offsetSource
field, or the source node's default outgoing offset if
that field's value is -1.
public int getTargetOffset()
offsetTarget
field, or the target node's default incoming offset if
that field's value is -1.
public int getWidth()
public void invert()
public boolean isFeedback()
true
if the edge was a feedback edge. The layout algorithm may
invert one or more edges to remove all cycles from the input. The set of edges that are
inverted are referred to as the "feedback" set.
true
if the edge is feedbackpublic Node opposite(Node end)
end
- one end
public void setDelta(int delta)
delta
- the new delta valuepublic void setPadding(int padding)
padding
- the paddingpublic void setSource(Node node)
node
- the new sourcepublic void setSourceOffset(int offset)
public void setTarget(Node node)
node
- the new targetpublic void setTargetOffset(int offset)
public void setWidth(int width)
width
- the new width
|
Eclipse Draw2d 3.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |