public interface INodeData
INodeData
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 ILayoutDataProvider
interface.
INodeData
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.
Modifier and Type | Method and Description |
---|---|
BorderLine |
createBorderLine(int side,
INodeLayout nodeLayout)
Creates, stores and returns a
BorderLine for the given side or returns the current BorderLine instance
if it already exists. |
Edge |
getAssociatedEdge()
|
Node |
getAssociatedNode()
|
ListCell |
getFirstSameLayerEdgeCell()
Gets the first same-layer edge
ListCell of all same-layer edges or null if there exists no same-layer
edge. |
Object |
getGroupId()
|
ILayers |
getGroupLayers()
|
Node |
getGroupNode()
Gets the group node this node belongs to.
|
Object |
getIncrementalHint()
Gets the hint of the incremental mode of the
Node of this INodeData instance if this node is of type
NodeDataType.NORMAL . |
int |
getLayer()
|
NodeLayoutDescriptor |
getNodeLayoutDescriptor()
Gets the
NodeLayoutDescriptor instance initially bound to the Node of this INodeData 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()
|
int |
getPosition()
|
SwimlaneDescriptor |
getSwimLaneDescriptor()
Gets the
SwimlaneDescriptor instance initially bound to the Node of this INodeData instance or null
if no SwimlaneDescriptor has been registered. |
NodeDataType |
getType()
|
int |
sameLayerEdgeCount()
|
BorderLine createBorderLine(int side, INodeLayout nodeLayout)
BorderLine
for the given side or returns the current BorderLine
instance
if it already exists.
Not every type
of node supports this operation. NodeDataType.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.
UnsupportedOperationException
- if this type
of node does not support node bordersside
- an integer value from [0,3]
intervalnodeLayout
- the INodeLayout
of the current nodeBorderLine
instancegetNormalizedBorderLine(int)
Edge getAssociatedEdge()
Edge
of the Node
of this INodeData
instance (in case of e.g.
bend or same-layer center node).
Edge
Node getAssociatedNode()
Node
of this INodeData
instance (in case of e.g.
back-loop proxy and side proxy).
Node
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 existsObject getGroupId()
null
if this node does not belong to an edge group node constructNodeDataType.SOURCE_GROUP_NODE
,
NodeDataType.TARGET_GROUP_NODE
ILayers getGroupLayers()
Node
of this INodeData
instance.
If this node is of type NodeDataType.GROUP
, this method returns the ILayers
object that describes the
layering in the subgraph.
Node getGroupNode()
Object getIncrementalHint()
Node
of this INodeData
instance if this node is of type
NodeDataType.NORMAL
.
The corresponding hint has been set by a IDataProvider
using key
HierarchicLayoutCore.INCREMENTAL_HINTS_DPKEY
.
Node
or com.yworks.yfiles.layout.hierarchic.HierarchicLayoutCore.IncrementalHint#NONE
NodeLayoutDescriptor getNodeLayoutDescriptor()
NodeLayoutDescriptor
instance initially bound to the Node
of this INodeData
instance or
null
if no NodeLayoutDescriptor
has been registered.NodeLayoutDescriptor
instance or null
if no NodeLayoutDescriptor
has been registeredBorderLine 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 INodeLayout
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]
intervalBorderLine
instance or null
createBorderLine(int, INodeLayout)
Node getParentGroupNode()
Node
(in the sense of hierarchically grouped graphs)int getPosition()
Node
within its current layerSwimlaneDescriptor getSwimLaneDescriptor()
SwimlaneDescriptor
instance initially bound to the Node
of this INodeData
instance or null
if no SwimlaneDescriptor
has been registered.SwimlaneDescriptor
instance or null
if no SwimlaneDescriptor
has been registeredNodeDataType getType()
int sameLayerEdgeCount()