Search this API

y.layout.circular
Class EdgeLayoutDescriptor

java.lang.Object
  extended by y.layout.circular.EdgeLayoutDescriptor

public class EdgeLayoutDescriptor
extends java.lang.Object

This class provides routing settings for edges routed internally by the CircularLayouter.

The offered settings affect only edges routed within or between circle partitions. The edge routing policy determines the edges that are interior.

See Also:
CircularLayouter.setEdgeRoutingPolicy(byte), CircularLayouter.EDGE_ROUTING_POLICY_AUTOMATIC, CircularLayouter.EDGE_ROUTING_POLICY_INTERIOR, CircularLayouter.EDGE_ROUTING_POLICY_MARKED_EXTERIOR, CircularLayouter.getDefaultEdgeLayoutDescriptor()
 

Field Summary
static int ON_CIRCLE_ROUTING_STYLE_CURVED
          A routing style constant specifying that edges between neighboring nodes of a partition are curved towards the circle's center.
static int ON_CIRCLE_ROUTING_STYLE_ON_CIRCLE
          A routing style constant specifying that edges between neighboring nodes of a partition are curved outwards on the circle's border.
static int ON_CIRCLE_ROUTING_STYLE_STRAIGHT
          A routing style constant specifying that edges between neighboring nodes should be straight lines.
static int ROUTING_STYLE_CURVED
          A routing style constant specifying that edges inside or between partitions should be curved.
static int ROUTING_STYLE_STRAIGHT
          A routing style constant specifying that edges inside or between partitions should be straight lines.
 
Constructor Summary
EdgeLayoutDescriptor()
          Creates a new EdgeLayoutDescriptor instance with default settings.
 
Method Summary
 int getBetweenCirclesRoutingStyle()
          Returns the routing style for edges between partitions.
 int getInCircleRoutingStyle()
          Returns the routing style for edges within partitions.
 int getOnCircleRoutingStyle()
          Returns the routing style for edges between neighbors in one partition.
 boolean isControlPointCreationEnabled()
          Returns whether or not the points of the resulting edge path represent cubic bezier control points.
 void setBetweenCirclesRoutingStyle(int betweenCirclesRoutingStyle)
          Specifies the routing style for edges between partitions.
 void setControlPointCreationEnabled(boolean controlPointCreation)
          Specifies whether or not the points of the resulting edge path represent cubic bezier control points.
 void setInCircleRoutingStyle(int inCircleRoutingStyle)
          Specifies the routing style for edges within partitions.
 void setOnCircleRoutingStyle(int onCircleRoutingStyle)
          Specifies the routing style for edges between neighbors in one partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROUTING_STYLE_STRAIGHT

public static final int ROUTING_STYLE_STRAIGHT
A routing style constant specifying that edges inside or between partitions should be straight lines.

See Also:
Constant Field Values
Sample Graph:

Routing style straight

ROUTING_STYLE_CURVED

public static final int ROUTING_STYLE_CURVED
A routing style constant specifying that edges inside or between partitions should be curved. All edges inside a partition are curved towards the center of the partition

 
Edges are only curved if EdgeBundling is turned off and CircularLayouter.PARTITION_LAYOUTSTYLE_CYCLIC is used.
See Also:
Constant Field Values
Sample Graph:

Routing style curved

ON_CIRCLE_ROUTING_STYLE_STRAIGHT

public static final int ON_CIRCLE_ROUTING_STYLE_STRAIGHT
A routing style constant specifying that edges between neighboring nodes should be straight lines.

See Also:
Constant Field Values
Sample Graph:

Routing style straight

ON_CIRCLE_ROUTING_STYLE_CURVED

public static final int ON_CIRCLE_ROUTING_STYLE_CURVED
A routing style constant specifying that edges between neighboring nodes of a partition are curved towards the circle's center.

 
Edges are only curved if EdgeBundling is turned off and CircularLayouter.PARTITION_LAYOUTSTYLE_CYCLIC is used.
See Also:
Constant Field Values
Sample Graph:

Routing style curved

ON_CIRCLE_ROUTING_STYLE_ON_CIRCLE

public static final int ON_CIRCLE_ROUTING_STYLE_ON_CIRCLE
A routing style constant specifying that edges between neighboring nodes of a partition are curved outwards on the circle's border.

 
Edges are only curved if EdgeBundling is turned off and CircularLayouter.PARTITION_LAYOUTSTYLE_CYCLIC is used.
See Also:
Constant Field Values
Sample Graph:

Routing style curved with circle edges going outwards
Constructor Detail

EdgeLayoutDescriptor

public EdgeLayoutDescriptor()
Creates a new EdgeLayoutDescriptor instance with default settings.

Method Detail

getInCircleRoutingStyle

public int getInCircleRoutingStyle()
Returns the routing style for edges within partitions.

Returns:
one of the predefined routing styles
See Also:
setInCircleRoutingStyle(int)

setInCircleRoutingStyle

public void setInCircleRoutingStyle(int inCircleRoutingStyle)
Specifies the routing style for edges within partitions.

Default Value:
The default value is ROUTING_STYLE_STRAIGHT. All interior edges are routed straight.
Parameters:
inCircleRoutingStyle - one of the predefined routing styles
Throws:
java.lang.IllegalArgumentException - if an unknown routing style is given

getOnCircleRoutingStyle

public int getOnCircleRoutingStyle()
Returns the routing style for edges between neighbors in one partition.

Returns:
one of the predefined routing styles
See Also:
setOnCircleRoutingStyle(int)

setOnCircleRoutingStyle

public void setOnCircleRoutingStyle(int onCircleRoutingStyle)
Specifies the routing style for edges between neighbors in one partition.

Default Value:
The default value is ROUTING_STYLE_STRAIGHT. All circle edges are routed straight.
Parameters:
onCircleRoutingStyle - one of the predefined routing styles
Throws:
java.lang.IllegalArgumentException - if an unknown routing style is given

getBetweenCirclesRoutingStyle

public int getBetweenCirclesRoutingStyle()
Returns the routing style for edges between partitions.

Returns:
one of the predefined routing styles
See Also:
setBetweenCirclesRoutingStyle(int)

setBetweenCirclesRoutingStyle

public void setBetweenCirclesRoutingStyle(int betweenCirclesRoutingStyle)
Specifies the routing style for edges between partitions.

 
If the edges between circles are routed with curved style, the algorithm uses larger distances between the partitions to have enough space for smooth curves.
Default Value:
The default value is ROUTING_STYLE_STRAIGHT. All inter edges are routed straight.
Parameters:
betweenCirclesRoutingStyle - one of the predefined routing styles
Throws:
java.lang.IllegalArgumentException - if an unknown routing style is given

isControlPointCreationEnabled

public boolean isControlPointCreationEnabled()
Returns whether or not the points of the resulting edge path represent cubic bezier control points.

 
This feature is useful when the visualization of the edge draws bezier curves instead of polyline paths.
Returns:
true if the bends are interpreted as cubic bezier control points, false otherwise
See Also:
setControlPointCreationEnabled(boolean)

setControlPointCreationEnabled

public void setControlPointCreationEnabled(boolean controlPointCreation)
Specifies whether or not the points of the resulting edge path represent cubic bezier control points.

 
This feature is useful when the visualization of the edge draws bezier curves instead of polyline paths.
Default Value:
The default value is false. Each point is a normal polyline bend point.
Parameters:
controlPointCreation - true if the points of the edge path should represent cubic bezier control points, false otherwise

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