Search this API

y.layout.hierarchic.incremental
Interface EdgeData


public interface EdgeData

This interface provides layout information about the edges of the graph during the layout.

EdgeData is a multi-purpose edge descriptor for each edge, holding information about the type of an edge, associated port constraints, port candidates, edge groups as well as the current edge state.

It is used in all phases of the HierarchicLayouter to store edge information.

 

Field Summary
static byte TYPE_DIRECT_SAME_LAYER_EDGE
          A constant describing a same-layer edge that connects directly two neighboring nodes.
static byte TYPE_GROUP_BORDER_EDGE
          A constant describing an edge that connects group border nodes in adjacent layers.
static byte TYPE_GROUP_NODE_INTERCONNECTOR
          A constant describing an edge that connects two group nodes.
static byte TYPE_NON_DIRECT_SAME_LAYER_EDGE
          A constant describing a same-layer edge that does not connect directly two neighboring nodes.
static byte TYPE_NORMAL
          A constant describing a normal edge.
static byte TYPE_REDIRECTED_GROUP_EDGE
          A constant describing an edge that has been added temporarily to replace an edge connected to a group node.
static byte TYPE_SOURCE_GROUP_NODE_CONNECTOR
          A constant describing an edge that connects to a source group node.
static byte TYPE_TARGET_GROUP_NODE_CONNECTOR
          A constant describing an edge that connects to a target group node.
 
Method Summary
 Edge getAssociatedEdge()
          Returns the Edge associated with this EdgeData instance.
 Node getAssociatedNode()
          Returns the Node associated with this EdgeData instance.
 int getCriticalEdgePriority()
          Returns the critical edge priority of the Edge associated with this EdgeData instance.
 double getCrossingCost()
          Returns the crossing cost of the Edge associated with this EdgeData instance.
 EdgeLayoutDescriptor getEdgeLayoutDescriptor()
          Returns the EdgeLayoutDescriptor instance bound to the Edge associated with this EdgeData instance.
 java.lang.Object getGroup()
          Returns the group that is represented by the Edge associated with this EdgeData instance.
 java.util.Collection getSourceCandidates()
          Returns the collection of PortCandidates for the source port of the Edge associated with this EdgeData instance.
 java.lang.Object getSourceGroup()
          Returns the ID of the edge group at the source node to which the Edge associated with this EdgeData instance belongs (if any).
 java.lang.Object getSourcePortGroup()
          Returns the ID of the edge port group at the source node to which the Edge associated with this EdgeData instance belongs (if any).
 PortConstraint getSPC()
          Returns the port constraints for the source port of the Edge associated with this EdgeData instance.
 java.util.Collection getTargetCandidates()
          Returns the collection of PortCandidates for the target port of the Edge associated with this EdgeData instance.
 java.lang.Object getTargetGroup()
          Returns the ID of the edge group at the target node to which the Edge associated with this EdgeData instance belongs (if any).
 java.lang.Object getTargetPortGroup()
          Returns the ID of the edge port group at the target node to which the Edge associated with this EdgeData instance belongs (if any).
 double getThickness()
          Returns the thickness of the Edge associated with this EdgeData instance.
 PortConstraint getTPC()
          Returns the port constraints for the target port of the Edge associated with this EdgeData instance.
 byte getType()
          Returns the type of the Edge associated with this EdgeData instance.
 boolean isFallbackUpperSameLayerEdge()
          Returns whether or not the Edge associated with this EdgeData instance should be an upper same-layer edge (if it is a same-layer edge).
 boolean isReversed()
          Returns whether or not the Edge associated with this EdgeData instance has been reversed.
 boolean isUpperSameLayerEdge()
          Returns whether or not the Edge associated with this EdgeData instance is an upper same-layer edge.
 void setFallbackUpperSameLayerEdge(boolean fallback)
          Specifies whether or not the Edge associated with this EdgeData instance should be an upper same-layer edge (if it is a same-layer edge).
 

Field Detail

TYPE_NORMAL

static final byte TYPE_NORMAL
A constant describing a normal edge.

See Also:
getType(), Constant Field Values

TYPE_SOURCE_GROUP_NODE_CONNECTOR

static final byte TYPE_SOURCE_GROUP_NODE_CONNECTOR
A constant describing an edge that connects to a source group node.

See Also:
getType(), Constant Field Values

TYPE_TARGET_GROUP_NODE_CONNECTOR

static final byte TYPE_TARGET_GROUP_NODE_CONNECTOR
A constant describing an edge that connects to a target group node.

See Also:
getType(), Constant Field Values

TYPE_GROUP_NODE_INTERCONNECTOR

static final byte TYPE_GROUP_NODE_INTERCONNECTOR
A constant describing an edge that connects two group nodes.

See Also:
getType(), Constant Field Values

TYPE_DIRECT_SAME_LAYER_EDGE

static final byte TYPE_DIRECT_SAME_LAYER_EDGE
A constant describing a same-layer edge that connects directly two neighboring nodes.

See Also:
getType(), Constant Field Values

TYPE_NON_DIRECT_SAME_LAYER_EDGE

static final byte TYPE_NON_DIRECT_SAME_LAYER_EDGE
A constant describing a same-layer edge that does not connect directly two neighboring nodes.

This means that two nodes of the same layer are not connected directly with a straight-line edge, but with an edge consisting of polyline segments.

See Also:
getType(), Constant Field Values

TYPE_GROUP_BORDER_EDGE

static final byte TYPE_GROUP_BORDER_EDGE
A constant describing an edge that connects group border nodes in adjacent layers.

See Also:
getType(), Constant Field Values

TYPE_REDIRECTED_GROUP_EDGE

static final byte TYPE_REDIRECTED_GROUP_EDGE
A constant describing an edge that has been added temporarily to replace an edge connected to a group node.

See Also:
getType(), Constant Field Values
Method Detail

getType

byte getType()
Returns the type of the Edge associated with this EdgeData instance.

Returns:
the type of the associated Edge

getAssociatedNode

Node getAssociatedNode()
Returns the Node associated with this EdgeData instance.

If no Node is associated with this EdgeData instance, null should be returned.

Returns:
the associated Node or null no such Node exists

getAssociatedEdge

Edge getAssociatedEdge()
Returns the Edge associated with this EdgeData instance.

If no Edge is associated with this EdgeData instance, null should be returned.

Returns:
the associated Edge or null no such Edge exists

getSPC

PortConstraint getSPC()
Returns the port constraints for the source port of the Edge associated with this EdgeData instance.

PortConstraints are obtained by a DataProvider registered with the graph with key PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY.

Returns:
a PortConstraint instance for the source port

getSourcePortGroup

java.lang.Object getSourcePortGroup()
Returns the ID of the edge port group at the source node to which the Edge associated with this EdgeData instance belongs (if any).

Information about edge port grouping at the source node is obtained by a DataProvider registered with the graph with key PortConstraintKeys.SOURCE_PORT_GROUP_ID_DPKEY.

Returns:
the ID of the port group at the source node

getSourceCandidates

java.util.Collection getSourceCandidates()
Returns the collection of PortCandidates for the source port of the Edge associated with this EdgeData instance.

Source port candidates are obtained by a DataProvider registered with the graph with key PortCandidate.SOURCE_PCLIST_DPKEY.

Returns:
a collection of PortCandidate for the source port

getTPC

PortConstraint getTPC()
Returns the port constraints for the target port of the Edge associated with this EdgeData instance.

PortConstraints are obtained by a DataProvider registered with the graph with key PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY.

Returns:
a PortConstraint instance for the target port

getTargetPortGroup

java.lang.Object getTargetPortGroup()
Returns the ID of the edge port group at the target node to which the Edge associated with this EdgeData instance belongs (if any).

Information about edge port grouping at the target node is obtained by a DataProvider registered with the graph with key PortConstraintKeys.TARGET_PORT_GROUP_ID_DPKEY.

Returns:
the ID of the group at the target node

getTargetCandidates

java.util.Collection getTargetCandidates()
Returns the collection of PortCandidates for the target port of the Edge associated with this EdgeData instance.

Target port candidates are obtained by a DataProvider registered with the graph with key PortCandidate.TARGET_PCLIST_DPKEY.

Returns:
a collection of PortCandidate for the target port

getSourceGroup

java.lang.Object getSourceGroup()
Returns the ID of the edge group at the source node to which the Edge associated with this EdgeData instance belongs (if any).

Information about edge grouping at the source node is obtained by a DataProvider registered with the graph with key PortConstraintKeys.SOURCE_GROUPID_KEY.

Returns:
the ID of the group at the source node

getTargetGroup

java.lang.Object getTargetGroup()
Returns the ID of the edge group at the target node to which the Edge associated with this EdgeData instance belongs (if any).

Information about edge grouping at the target node is obtained by a DataProvider registered with the graph with key PortConstraintKeys.TARGET_GROUPID_KEY.

Returns:
the ID of the group at the target node

getGroup

java.lang.Object getGroup()
Returns the group that is represented by the Edge associated with this EdgeData instance.

Returns:
the group represented by the associated Edge

isReversed

boolean isReversed()
Returns whether or not the Edge associated with this EdgeData instance has been reversed.

Returns:
true if the associated Edge has been reversed, false otherwise

isUpperSameLayerEdge

boolean isUpperSameLayerEdge()
Returns whether or not the Edge associated with this EdgeData instance is an upper same-layer edge.

An upper same-layer edge is an edge connecting two nodes of the same layer with polyline segments (not directly, with a straight-line) and is routed above the layer.

Returns:
true if the associated Edge is an upper same-layer edge, false otherwise

getEdgeLayoutDescriptor

EdgeLayoutDescriptor getEdgeLayoutDescriptor()
Returns the EdgeLayoutDescriptor instance bound to the Edge associated with this EdgeData instance.

If no EdgeLayoutDescriptor is bound to the edge, null should be returned.

Returns:
an EdgeLayoutDescriptor instance or null if no EdgeLayoutDescriptor is registered

setFallbackUpperSameLayerEdge

void setFallbackUpperSameLayerEdge(boolean fallback)
Specifies whether or not the Edge associated with this EdgeData instance should be an upper same-layer edge (if it is a same-layer edge).

An upper same-layer edge is an edge connecting two nodes of the same layer with polyline segments (not directly, with straight-line) and is routed above the layer.

If enabled the edge will be routed above the layer, otherwise below it.

Parameters:
fallback - true if the same-layer edge should be routed above the layer, false otherwise

isFallbackUpperSameLayerEdge

boolean isFallbackUpperSameLayerEdge()
Returns whether or not the Edge associated with this EdgeData instance should be an upper same-layer edge (if it is a same-layer edge).

An upper same-layer edge is an edge connecting two nodes of the same layer with polyline segments (not directly, with a straight-line) and is routed above the layer.

If enabled the edge will be routed above the layer, otherwise below it.

Returns:
true if the same-layer edge should be routed above the layer, false otherwise
See Also:
setFallbackUpperSameLayerEdge(boolean)

getThickness

double getThickness()
Returns the thickness of the Edge associated with this EdgeData instance.

The thickness is considered when calculating minimum distances so that there are no overlaps between edges and other graph elements.

The thickness must have a non-negative value.

Returns:
the thickness for the edge

getCrossingCost

double getCrossingCost()
Returns the crossing cost of the Edge associated with this EdgeData instance.

The crossings costs of edges are considered when minimizing the edge crossing count during the sequencing phase.

Returns:
the edge crossing cost of the edge

getCriticalEdgePriority

int getCriticalEdgePriority()
Returns the critical edge priority of the Edge associated with this EdgeData instance.

The layout algorithm tries to vertically align each node pair that is connected by a critical edge. Conflicts between different critical edges are always resolved in favor of the edge with the higher priority.

Returns:
the critical edge priority of the edge

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.