|
Eclipse Draw2d 3.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.graph.Node
A node in a DirectedGraph. A node has 0 or more incoming and outgoing Edge
s. A
node is given a width and height by the client. When a layout places the node in the
graph, it will determine the node's x and y location. It may also modify the node's
height.
A node represents both the input and the output for a layout
algorithm. The following fields are used as input to a graph layout:
width
- the node's width.
height
- the node's height.
outgoing
- the node's outgoing edges.
incoming
- the node's incoming edges.
incomingOffset
- the default attachment point for incoming edges.
outgoingOffset
- the default attachment point for outgoing edges.
The following fields are calculated by a graph layout and comprise the output:
x
- the node's x location
y
- the node's y location
height
- the node's height may be stretched to match the height of other
nodes
Field Summary | |
Object |
data
Clients may use this field to mark the Node with an arbitrary data object. |
boolean |
flag
For internal use only. |
int |
height
The height of this node. |
EdgeList |
incoming
The edges for which this node is the target. |
int |
incomingOffset
The default attachment point for incoming edges. |
int |
index
For internal use only. |
int |
nestingIndex
For internal use only. |
EdgeList |
outgoing
The edges for which this node is the source. |
int |
outgoingOffset
For internal use only. |
int |
rank
The horizontal row to which this node belongs. |
double |
sortValue
A value used to sort the node within its rank. |
int |
width
The node's width. |
Object[] |
workingData
For internal use only. |
int[] |
workingInts
For internal use only. |
int |
x
The node's x coordinate. |
int |
y
The node's y coordinate. |
Constructor Summary | |
Node()
Constructs a new node. |
|
Node(Object data)
Constructs a node with the given data object |
|
Node(Object data,
Subgraph parent)
Constructs a node with the given data object and parent subgraph. |
|
Node(Subgraph parent)
Constructs a node inside the given subgraph. |
Method Summary | |
int |
getOffsetIncoming()
Returns the incoming attachment point. |
int |
getOffsetOutgoing()
Returns the outgoing attachment point. |
Insets |
getPadding()
Returns the padding for this node or null if the default padding for the
graph should be used. |
Subgraph |
getParent()
Returns the parent Subgraph or null |
boolean |
isNested(Node node)
For internal use only. |
void |
setPadding(Insets padding)
Sets the padding. |
void |
setParent(Subgraph parent)
Sets the parent subgraph. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public Object[] workingData
public int[] workingInts
public Object data
public boolean flag
public int height
public EdgeList incoming
public int incomingOffset
-1
indicates that the
node's horizontal center should be used.
public int index
public int nestingIndex
public EdgeList outgoing
public int outgoingOffset
public int rank
public double sortValue
public int width
public int x
public int y
Constructor Detail |
public Node()
public Node(Object data)
data
- an arbitrary data objectpublic Node(Subgraph parent)
parent
- the parent subgraphpublic Node(Object data, Subgraph parent)
data
- an arbitrary data objectparent
- the parent subgraph or null
Method Detail |
public int getOffsetIncoming()
public int getOffsetOutgoing()
public Insets getPadding()
null
if the default padding for the
graph should be used.
null
public Subgraph getParent()
null
null
public boolean isNested(Node node)
true
if the given node is equal to this
node. This method is implemented for consitency with Subgraph.
node
- the node in question
true
if nestedpublic void setPadding(Insets padding)
padding
- the paddingpublic void setParent(Subgraph parent)
parent
- the parentpublic String toString()
Object.toString()
|
Eclipse Draw2d 3.0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |