Search this API

y.layout
Class CurveConnectionStyle

java.lang.Object
  extended by y.layout.CurveConnectionStyle

public final class CurveConnectionStyle
extends java.lang.Object

The CurveConnectionStyle provides specifiers that define how edges routed using a curved style connect at the respective source and target node.

See Also:
RoutingStyle.EDGE_STYLE_CURVED, EdgeLayoutDescriptor.EDGE_STYLE_CURVED, CurveRoutingStage
 

Field Summary
static byte KEEP_PORT
          Curve connection style that keeps the port and the first/last segment that the layout algorithm would produce without curve routing.
static byte ORGANIC
          Curve connection style that changes the part of a curved edge path such that the curves have a more organic-like and straight start or end.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEEP_PORT

public static final byte KEEP_PORT
Curve connection style that keeps the port and the first/last segment that the layout algorithm would produce without curve routing.

See Also:
RoutingStyle.setSourceCurveConnectionStyle(byte), RoutingStyle.setTargetCurveConnectionStyle(byte), EdgeLayoutDescriptor.setSourceCurveConnectionStyle(byte), EdgeLayoutDescriptor.setTargetCurveConnectionStyle(byte), CurveEdgeLayoutDescriptor.setSourceCurveConnectionStyle(byte), CurveEdgeLayoutDescriptor.setTargetCurveConnectionStyle(byte), Constant Field Values
Sample Graph:

Curved edges with the ports kept as they are in a hierarchical layout

ORGANIC

public static final byte ORGANIC
Curve connection style that changes the part of a curved edge path such that the curves have a more organic-like and straight start or end.

The port location is specifically amended for the curve routing such that the connecting part of the curve can be routed directly into the required edge direction. This feature generates more direct and straighter routes that have less direction turns. In consequence, the resulting layouts may be more compact overall as less space for the routing is required.

The side where the port ends up at the source/target node may be changed with respect to the side the layout algorithm initially chooses. It is not changed if there are port constraints defined for it (i.e. PortConstraints or PortCandidates). This includes implicit constraints for the port due to port and edge grouping. Similarly, this style can also not be applied if there is an edge label or NodeHalos that require the connecting segment to remain as it is.

In contrast to KEEP_PORT, this style does not guarantee to respect the specified minimum first and last segment length settings.

See Also:
RoutingStyle.setSourceCurveConnectionStyle(byte), RoutingStyle.setTargetCurveConnectionStyle(byte), EdgeLayoutDescriptor.setSourceCurveConnectionStyle(byte), EdgeLayoutDescriptor.setTargetCurveConnectionStyle(byte), CurveEdgeLayoutDescriptor.setSourceCurveConnectionStyle(byte), CurveEdgeLayoutDescriptor.setTargetCurveConnectionStyle(byte), Constant Field Values
Sample Graph:

Organic-like curve connections in a hierarchical layout

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