|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeData
Multi-purpose node descriptor for each node in the graph during the
hierarchic layout used internally by the algorithm implementations.
Instances of this interface can be obtained during the layout from instances
of the LayoutDataProvider
interface.
NodeData typically carries a node's type and depending on the type an
optional associated Edge
and
associated Node
. Optionally they may carry
a geometric description of the Node's borders and descriptors for various
aspects of the layout.
Field Summary | |
---|---|
static byte |
TYPE_BEND
Node type constant as returned by getType() . |
static byte |
TYPE_DISTANCE_NODE
Node type constant as returned by getType() . |
static byte |
TYPE_GROUP
Node type constant as returned by getType() . |
static byte |
TYPE_GROUP_BEGIN
Node type constant as returned by getType() . |
static byte |
TYPE_GROUP_END
Node type constant as returned by getType() . |
static byte |
TYPE_GROUP_LAYER_DUMMY
Node type constant as returned by getType() . |
static byte |
TYPE_LABEL
Node type constant as returned by getType() . |
static byte |
TYPE_NORMAL
Node type constant as returned by getType() . |
static byte |
TYPE_PROXY_FOR_EDGE_AT_GROUP
Node type constant as returned by getType() . |
static byte |
TYPE_SAME_LAYER_CENTER_NODE
Node type constant as returned by getType() . |
static byte |
TYPE_SAME_LAYER_SIDE_PROXY
Node type constant as returned by getType() . |
static byte |
TYPE_SIDE_PROXY
Node type constant as returned by getType() . |
static byte |
TYPE_SOURCE_BACKLOOP_PROXY
Node type constant as returned by getType() . |
static byte |
TYPE_SOURCE_GROUP_NODE
Node type constant as returned by getType() . |
static byte |
TYPE_TARGET_BACKLOOP_PROXY
Node type constant as returned by getType() . |
static byte |
TYPE_TARGET_GROUP_NODE
Node type constant as returned by getType() . |
Method Summary | |
---|---|
BorderLine |
createBorderLine(int side,
NodeLayout nl)
Creates, stores, and returns a BorderLine for the given side or returns the currently set BorderLine if it already exists. |
Edge |
getAssociatedEdge()
Returns the associated edge (in case of e.g. bend or same layer center node) |
Node |
getAssociatedNode()
Returns the associated node (in case of e.g. backloop proxy and side proxy) |
ListCell |
getFirstSameLayerEdgeCell()
Returns the first same layer edge ListCell of all same layer edges. |
Object |
getGroupId()
Returns group id of this node if it is a bus group node. |
Layers |
getGroupLayers()
Returns the inner layers of this group node. |
Node |
getGroupNode()
Returns the group node this node belongs to. |
HierarchicLayouter.IncrementalHint |
getIncrementalHint()
Returns the hint of the incremental mode of this node if this node is of type TYPE_NORMAL
and a corresponding hint has been set via the HierarchicLayouter.INCREMENTAL_HINTS_DPKEY
DataProvider. |
int |
getLayer()
Returns the layer index this node resides in |
NodeLayoutDescriptor |
getNodeLayoutDescriptor()
Returns the NodeLayoutDescriptor instance that was initially
bound to this node or null . |
BorderLine |
getNormalizedBorderLine(int side)
Returns a borderline for the given side which is treated as if the node's position was at (0,0). |
Node |
getParentGroupNode()
Returns the parent group node if any |
int |
getPosition()
Returns the current position of this node in its layer. |
SwimLaneDescriptor |
getSwimLaneDescriptor()
Returns the SwimLaneDescriptor instance that was initially
bound to this node or null . |
byte |
getType()
Returns the type constant for this node |
int |
sameLayerEdgeCount()
Returns the number of same layer edges that are associated with this node |
Field Detail |
---|
static final byte TYPE_NORMAL
getType()
.
A normal node - may have any degree, any size and any number of connected
same layer edges.
static final byte TYPE_BEND
getType()
.
A bend node - has degree 2, small size and no same layer edges.
static final byte TYPE_SIDE_PROXY
getType()
.
A side proxy node in case port constraints are used for the drawing phase
- has degree 1, small size and no same layer edges.
The associated node is the node this node is the proxy of.
static final byte TYPE_SAME_LAYER_SIDE_PROXY
getType()
.
A side proxy node for drawing same layer edges - has degree 0, small size
and one same layer edge.
The associated node is the node this node is the proxy of.
The associated edge is the same layer edge this node is the proxy of.
static final byte TYPE_LABEL
getType()
.
A label node for drawing - has degree 2, size of the labels and no same layer edges.
The borders of this node describe the layout of the labels
static final byte TYPE_GROUP
getType()
.
A group node if nested graph layouts are calculated.
Carries additional Layers
information.
getGroupLayers()
,
Constant Field Valuesstatic final byte TYPE_SOURCE_GROUP_NODE
getType()
.
A source group node for bus edges. This node serves as a dummy node
in a Layer.TYPE_SOURCE_GROUP_NODES
layer.
getGroupId()
,
Constant Field Valuesstatic final byte TYPE_TARGET_GROUP_NODE
getType()
.
A target group node for bus edges. This node serves as a dummy node
in a Layer.TYPE_TARGET_GROUP_NODES
layer.
getGroupId()
,
Constant Field Valuesstatic final byte TYPE_SOURCE_BACKLOOP_PROXY
getType()
.
A backloop proxy that belongs to the source of an edge
- has degree 2, small size and exactly one same layer edge
static final byte TYPE_TARGET_BACKLOOP_PROXY
getType()
.
A backloop proxy that belongs to the target of an edge
- has degree 2, small size and exactly one same layer edge
static final byte TYPE_SAME_LAYER_CENTER_NODE
getType()
.
A same layer edge crossing dummy node - has degree 2,
small size and exactly two same layer edges.
Is used to mark the crossing of the layer if source and target port
are at opposite layer sides.
static final byte TYPE_DISTANCE_NODE
getType()
.
A node used for the drawing phase to keep the distance between two nodes.
static final byte TYPE_GROUP_BEGIN
getType()
.
A node used for the drawing phase to mark the beginning of a node group interval.
static final byte TYPE_GROUP_END
getType()
.
A node used for the drawing phase to mark the ending of a node group interval.
static final byte TYPE_GROUP_LAYER_DUMMY
getType()
.
A node used for the the sequencing and drawing phase to mark a dummy node inserted to guarantee that a group
is non-empty on each layer that it is defined on.
static final byte TYPE_PROXY_FOR_EDGE_AT_GROUP
getType()
.
A node used for the the sequencing and drawing phase to mark a dummy node that has been inserted
as a legal end point of an edge connecting to a group node.
Method Detail |
---|
Node getGroupNode()
null
if this node is a top level
node.BorderLine getNormalizedBorderLine(int side)
null
to indicate that the borderline can be determined
through the node's NodeLayout
side
- the index of the side where 0
means top, 1
means right, 2
means bottom, and 3
means left.
null
createBorderLine(int, NodeLayout)
BorderLine createBorderLine(int side, NodeLayout nl)
TYPE_NORMAL
supports borderlines.
UnsupportedOperationException
- if this type of node does not support node
bordersside
- the side as defined in getNormalizedBorderLine(int)
nl
- the NodeLayout of the current node, the initial Borderline will
be initialize from this instancegetNormalizedBorderLine(int)
ListCell getFirstSameLayerEdgeCell()
ListCell
containing the first same layer edge or null
if there is no same layer edgeint sameLayerEdgeCount()
byte getType()
Object getGroupId()
null
if this node does not
belong to a edge group node construct.TYPE_SOURCE_GROUP_NODE
,
TYPE_TARGET_GROUP_NODE
Node getAssociatedNode()
Edge getAssociatedEdge()
int getLayer()
Layer
instance this node resides inint getPosition()
Node getParentGroupNode()
Layers getGroupLayers()
TYPE_GROUP
, this method returns the
Layers
object that describes the layering in the subgraph.
HierarchicLayouter.IncrementalHint getIncrementalHint()
TYPE_NORMAL
and a corresponding hint has been set via the HierarchicLayouter.INCREMENTAL_HINTS_DPKEY
DataProvider.
HierarchicLayouter.IncrementalHint.NONE
NodeLayoutDescriptor getNodeLayoutDescriptor()
NodeLayoutDescriptor
instance that was initially
bound to this node or null
.
NodeLayoutDescriptor
instance bound to this node.SwimLaneDescriptor getSwimLaneDescriptor()
SwimLaneDescriptor
instance that was initially
bound to this node or null
.
SwimLaneDescriptor
bound to this node.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |