|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeData
This interface provides layout information about the nodes of the graph during the layout.
NodeData
is a multi-purpose node descriptor for each node of 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 the type
of the node and depending on the type an optional
associated edge
and associated node
.
Optionally, it may carry a geometric description of the borders of the node and descriptors for various aspects
of the layout.
Field Summary | |
---|---|
static byte |
TYPE_BEND
A constant describing a bend Node . |
static byte |
TYPE_BUS_STRUCTURE_DUMMY
A constant describing a Node that is used during the sequencing and drawing phase for the bus-style
routing of bus edges at a certain root node. |
static byte |
TYPE_DISTANCE_NODE
A constant describing a Node used for the drawing phase to keep the distance between two nodes. |
static byte |
TYPE_GROUP
A constant describing a group Node for nested graph layouts. |
static byte |
TYPE_GROUP_BEGIN
A constant describing a Node used during the drawing phase for marking the beginning of a node group interval. |
static byte |
TYPE_GROUP_END
A constant describing a Node used during the drawing phase for marking the ending of a node group interval. |
static byte |
TYPE_GROUP_LAYER_DUMMY
A constant describing a Node used during the sequencing and drawing phase for marking a dummy node inserted to
guarantee that a group is non-empty on the layer on which it is defined. |
static byte |
TYPE_LABEL
A constant describing a label Node . |
static byte |
TYPE_NORMAL
A constant describing a normal Node . |
static byte |
TYPE_PROXY_FOR_CONTENT_EDGE_AT_GROUP
A constant describing a Node used during the sequencing and drawing phase for marking a dummy node
inserted as a legal endpoint of an edge connecting a descendant node to a group node. |
static byte |
TYPE_PROXY_FOR_EDGE_AT_GROUP
A constant describing a Node used during the sequencing and drawing phase for marking a dummy node
inserted as a legal endpoint of an edge connecting to a group node. |
static byte |
TYPE_RECURSIVE_EDGE_DUMMY
A constant describing a Node used during sequencing and drawing phase for routing an Edge
recursively. |
static byte |
TYPE_SAME_LAYER_CENTER_NODE
A constant describing a same-layer edge crossing dummy Node . |
static byte |
TYPE_SAME_LAYER_SIDE_PROXY
A constant describing a side proxy Node for drawing same-layer edges. |
static byte |
TYPE_SIDE_PROXY
A constant describing a side proxy Node . |
static byte |
TYPE_SOURCE_BACKLOOP_PROXY
A constant describing a back-loop proxy that belongs to the source of an edge. |
static byte |
TYPE_SOURCE_GROUP_NODE
A constant describing a source group Node for bus edges. |
static byte |
TYPE_TARGET_BACKLOOP_PROXY
A constant describing a back-loop proxy that belongs to the target of an edge. |
static byte |
TYPE_TARGET_GROUP_NODE
A constant describing a target group Node for bus edges. |
Method Summary | |
---|---|
BorderLine |
createBorderLine(int side,
NodeLayout nodeLayout)
Creates, stores and returns a BorderLine for the given side or returns the current
BorderLine instance if it already exists. |
Edge |
getAssociatedEdge()
Returns the associated Edge of the Node of this NodeData instance
(in case of e.g. bend or same-layer center node). |
Node |
getAssociatedNode()
Returns the associated Node of this NodeData instance (in case of e.g. back-loop proxy and side proxy). |
ListCell |
getFirstSameLayerEdgeCell()
Returns the first same-layer edge ListCell of all same-layer edges or null if there exists no
same-layer edge. |
java.lang.Object |
getGroupId()
Returns the group ID of the Node of this NodeData instance if it is a bus-group node. |
Layers |
getGroupLayers()
Returns the inner layers of the group Node of this NodeData instance. |
Node |
getGroupNode()
Returns the group node this node belongs to. |
HierarchicLayouter.IncrementalHint |
getIncrementalHint()
Returns the hint of the incremental mode of the Node of this NodeData instance if
this node is of type TYPE_NORMAL . |
int |
getLayer()
Returns the index of the Layer instance to which the Node of this NodeData
instance belongs. |
NodeLayoutDescriptor |
getNodeLayoutDescriptor()
Returns the NodeLayoutDescriptor instance initially bound to the Node of this
NodeData instance or null if no NodeLayoutDescriptor has been registered. |
BorderLine |
getNormalizedBorderLine(int side)
Returns a BorderLine for the given side which is treated as if the position of the node is at (0,0). |
Node |
getParentGroupNode()
Returns the parent group node of the Node of this NodeData instance (if any). |
int |
getPosition()
Returns the current position of the Node of this NodeData
instance within its layer. |
SwimLaneDescriptor |
getSwimLaneDescriptor()
Returns the SwimLaneDescriptor instance initially bound to the Node of this
NodeData instance or null if no SwimLaneDescriptor has been registered. |
byte |
getType()
Returns the type constant for the Node of this NodeData instance. |
int |
sameLayerEdgeCount()
Returns the number of same-layer edges associated with the Node of this NodeData instance. |
Field Detail |
---|
static final byte TYPE_NORMAL
Node
.
A normal node may have any degree, any size and any number of connected same-layer edges.
getType()
,
Constant Field Valuesstatic final byte TYPE_BEND
Node
.
A bend node has degree 2
, small size and no same-layer edges.
getType()
,
Constant Field Valuesstatic final byte TYPE_SIDE_PROXY
Node
.
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 one of which this node is the proxy.
getType()
,
Constant Field Valuesstatic final byte TYPE_SAME_LAYER_SIDE_PROXY
Node
for drawing same-layer edges.
A side proxy node for drawing same-layer edges has degree 0
, small size and one same-layer edge.
The associated node is the one of which this node is the proxy.
The associated edge is the same-layer edge of which this node is the proxy.
getType()
,
Constant Field Valuesstatic final byte TYPE_LABEL
Node
.
A label node has degree 2
, size of the labels and no same-layer edges. The borders of
this node describe the layout of the labels.
getType()
,
Constant Field Valuesstatic final byte TYPE_GROUP
Node
for nested graph layouts.
This group node carries additional Layers
information.
getType()
,
getGroupLayers()
,
Constant Field Valuesstatic final byte TYPE_SOURCE_GROUP_NODE
Node
for bus edges.
This node serves as a dummy node in a Layer.TYPE_SOURCE_GROUP_NODES
layer.
getType()
,
getGroupId()
,
Constant Field Valuesstatic final byte TYPE_TARGET_GROUP_NODE
Node
for bus edges.
This node serves as a dummy node in a Layer.TYPE_TARGET_GROUP_NODES
layer.
getType()
,
getGroupId()
,
Constant Field Valuesstatic final byte TYPE_SOURCE_BACKLOOP_PROXY
A back-loop proxy that belongs to the source of an edge has degree 2
, small size and exactly one
same-layer edge.
getType()
,
Constant Field Valuesstatic final byte TYPE_TARGET_BACKLOOP_PROXY
A back-loop proxy that belongs to the target of an edge has degree 2
, small size and exactly one
same-layer edge.
getType()
,
Constant Field Valuesstatic final byte TYPE_SAME_LAYER_CENTER_NODE
Node
.
A same-layer edge crossing dummy node has degree 2
, small size and exactly two same-layer edges.
It is used for marking the crossing of the layer, if source and target port are at opposite layer sides.
getType()
,
Constant Field Valuesstatic final byte TYPE_DISTANCE_NODE
Node
used for the drawing phase to keep the distance between two nodes.
getType()
,
Constant Field Valuesstatic final byte TYPE_GROUP_BEGIN
Node
used during the drawing phase for marking the beginning of a node group interval.
getType()
,
Constant Field Valuesstatic final byte TYPE_GROUP_END
Node
used during the drawing phase for marking the ending of a node group interval.
getType()
,
Constant Field Valuesstatic final byte TYPE_GROUP_LAYER_DUMMY
Node
used during the sequencing and drawing phase for marking a dummy node inserted to
guarantee that a group is non-empty on the layer on which it is defined.
getType()
,
Constant Field Valuesstatic final byte TYPE_PROXY_FOR_EDGE_AT_GROUP
Node
used during the sequencing and drawing phase for marking a dummy node
inserted as a legal endpoint of an edge connecting to a group node.
getType()
,
Constant Field Valuesstatic final byte TYPE_PROXY_FOR_CONTENT_EDGE_AT_GROUP
Node
used during the sequencing and drawing phase for marking a dummy node
inserted as a legal endpoint of an edge connecting a descendant node to a group node.
It has degree 0
or 1
depending on whether or not the opposite node of the edge is
assigned to the same layer. This kind of proxy nodes is only used if there are edges that shall connect to the
group node without backloops.
EdgeLayoutDescriptor.setDirectGroupContentEdgeRoutingEnabled(boolean)
,
Constant Field Valuesstatic final byte TYPE_RECURSIVE_EDGE_DUMMY
Node
used during sequencing and drawing phase for routing an Edge
recursively. An Edge
that connects to the content of a group node has to leave the group node at the bottom
side and enter it at the top side.
getType()
,
Constant Field Valuesstatic final byte TYPE_BUS_STRUCTURE_DUMMY
Node
that is used during the sequencing and drawing phase for the bus-style
routing of bus edges at a certain root node. Such a node is inserted on each layer of the bus structure.
getType()
,
IncrementalHierarchicLayouter.BUS_DESCRIPTOR_DPKEY
,
Constant Field ValuesMethod Detail |
---|
Node getGroupNode()
Node
belongs or null
if the associated
Node
is a top level node.BorderLine getNormalizedBorderLine(int side)
BorderLine
for the given side which is treated as if the position of the node is at (0,0).
Clients may modify this instance but should always reset it to the original position, since this is a shared instance.
It may return null
to indicate that the BorderLine
can be determined through the
NodeLayout
instance.
Side value must be inside [0,3]
interval, where 0
corresponds to the top side, 1
to the right side, 2
to the bottom side and 3
to the left side.
side
- an integer value from [0,3]
interval
BorderLine
instance or null
createBorderLine(int, NodeLayout)
BorderLine createBorderLine(int side, NodeLayout nodeLayout)
BorderLine
for the given side or returns the current
BorderLine
instance if it already exists.
Not every type
of node supports this operation. TYPE_NORMAL
supports BorderLine
s.
Side value must be inside [0,3]
interval, where 0
corresponds to the top side, 1
to the right side, 2
to the bottom side and 3
to the left side.
side
- an integer value from [0,3]
intervalnodeLayout
- the NodeLayout
of the current node
BorderLine
instance
java.lang.UnsupportedOperationException
- if this type
of node does not support node bordersgetNormalizedBorderLine(int)
ListCell getFirstSameLayerEdgeCell()
ListCell
of all same-layer edges or null
if there exists no
same-layer edge.
ListCell
containing the first same-layer edge or null
if no same-layer edge existsint sameLayerEdgeCount()
Node
of this NodeData
instance.
byte getType()
Node
of this NodeData
instance.
java.lang.Object getGroupId()
Node
of this NodeData
instance if it is a bus-group node.
null
if this node does not belong to an edge group node constructTYPE_SOURCE_GROUP_NODE
,
TYPE_TARGET_GROUP_NODE
Node getAssociatedNode()
Node
of this NodeData
instance (in case of e.g. back-loop proxy and side proxy).
Node
Edge getAssociatedEdge()
Edge
of the Node
of this NodeData
instance
(in case of e.g. bend or same-layer center node).
Edge
int getLayer()
Layer
instance to which the Node
of this NodeData
instance belongs.
Layer
instance to which this Node
belongsint getPosition()
Node
of this NodeData
instance within its layer.
Node
within its current layerNode getParentGroupNode()
Node
of this NodeData
instance (if any).
Node
(in the sense of hierarchically grouped graphs)Layers getGroupLayers()
Node
of this NodeData
instance.
If this node is of type TYPE_GROUP
, this method returns the Layers
object that describes the
layering in the subgraph.
HierarchicLayouter.IncrementalHint getIncrementalHint()
Node
of this NodeData
instance if
this node is of type TYPE_NORMAL
.
The corresponding hint has been set by a DataProvider
using key
HierarchicLayouter.INCREMENTAL_HINTS_DPKEY
.
Node
or HierarchicLayouter.IncrementalHint.NONE
NodeLayoutDescriptor getNodeLayoutDescriptor()
NodeLayoutDescriptor
instance initially bound to the Node
of this
NodeData
instance or null
if no NodeLayoutDescriptor
has been registered.
NodeLayoutDescriptor
instance or null
if no
NodeLayoutDescriptor
has been registeredSwimLaneDescriptor getSwimLaneDescriptor()
SwimLaneDescriptor
instance initially bound to the Node
of this
NodeData
instance or null
if no SwimLaneDescriptor
has been registered.
SwimLaneDescriptor
instance or null
if no
SwimLaneDescriptor
has been registered
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |