|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty.layout.hierarchic.incremental.RoutingStyle
public class RoutingStyle
This class is used by EdgeLayoutDescriptor
to specify the routing style for different types of edges.
EdgeLayoutDescriptor.setRoutingStyle(RoutingStyle)
,
EdgeData.getType()
Field Summary | |
---|---|
static byte |
EDGE_STYLE_CURVED
A routing style constant specifying that the edges should be curved. |
static byte |
EDGE_STYLE_OCTILINEAR
A routing style constant specifying that the edges should be octilinear. |
static byte |
EDGE_STYLE_ORTHOGONAL
A routing style constant specifying that the edges should be orthogonal. |
static byte |
EDGE_STYLE_POLYLINE
A routing style constant specifying that the edges should be polyline. |
Constructor Summary | |
---|---|
RoutingStyle(byte routingStyle)
Creates a new RoutingStyle instance with the given routing style for each edge. |
|
RoutingStyle(byte routingStyle,
boolean controlPointCreation)
Creates a new RoutingStyle instance with the given routing style for each edge and also specifying
whether or not the resulting path should consist of cubic bezier control points. |
Method Summary | |
---|---|
byte |
getBackloopRoutingStyle()
Returns the routing style for back-loop edges. |
byte |
getDefaultEdgeRoutingStyle()
Returns the default routing style for edges that have no individual routing style. |
byte |
getEdgeGroupRoutingStyle()
Returns the routing style for grouped edges at the common segments. |
byte |
getSameLayerEdgeRoutingStyle()
Returns the routing style for same-layer edges. |
byte |
getSelfloopRoutingStyle()
Returns the routing style for self-loops. |
byte |
getSourceCurveConnectionStyle()
Returns the style which determines how curved edge paths connect at the source side of the edge. |
byte |
getTargetCurveConnectionStyle()
Returns the style which determines how curved edge paths connect at the target side of the edge. |
boolean |
isControlPointCreationEnabled()
Returns whether or not the points of the resulting edge path represent cubic bezier control points. |
void |
setBackloopRoutingStyle(byte backloopRoutingStyle)
Specifies the routing style for back-loop edges. |
void |
setControlPointCreationEnabled(boolean controlPointCreation)
Specifies whether or not the points of the resulting edge path represent cubic bezier control points. |
void |
setDefaultEdgeRoutingStyle(byte defaultEdgeRoutingStyle)
Specifies the default routing style for edges that have no individual routing style. |
void |
setEdgeGroupRoutingStyle(byte edgeGroupRoutingStyle)
Specifies the routing style for grouped edges at the common segments. |
void |
setSameLayerEdgeRoutingStyle(byte sameLayerEdgeRoutingStyle)
Specifies the routing style for same-layer edges. |
void |
setSelfloopRoutingStyle(byte selfloopRoutingStyle)
Specifies the routing style for self-loops. |
void |
setSourceCurveConnectionStyle(byte curveConnectionStyle)
Specifies the style which determines how curved edge paths connect at the source side of the edge. |
void |
setTargetCurveConnectionStyle(byte curveConnectionStyle)
Specifies the style which determines how curved edge paths connect at the target side of the edge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte EDGE_STYLE_ORTHOGONAL
public static final byte EDGE_STYLE_OCTILINEAR
-1
and 1
.
public static final byte EDGE_STYLE_POLYLINE
public static final byte EDGE_STYLE_CURVED
Curved edges are constructed using cubic bezier splines. As for other routing styles, overlaps with other
elements are avoided. If there is very little space for a smooth curve, it can happen that the resulting
path is polyline or almost polyline with little curving. To reserve more space for curved edges,
one can increase values of settings that influence the distances between graph elements, e.g.,
EdgeLayoutDescriptor.getMinimumDistance()
.
When integrated edge labeling
is enabled, for edge labels a straight, non-curved segment where the label
is placed will be inserted. All the settings of the PreferredPlacementDescriptor
are supported.
Similarly, for the minimum first segment length
and the minimum last segment length
, a straight
edge segment is created to fulfill the constraints.
setControlPointCreationEnabled(boolean)
![]() Routing style curved |
Constructor Detail |
---|
public RoutingStyle(byte routingStyle)
RoutingStyle
instance with the given routing style for each edge.
routingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic RoutingStyle(byte routingStyle, boolean controlPointCreation)
RoutingStyle
instance with the given routing style for each edge and also specifying
whether or not the resulting path should consist of cubic bezier control points.
routingStyle
- one of the predefined routing stylescontrolPointCreation
- true
if the resulting path should consist of cubic bezier
control points, false
otherwise
java.lang.IllegalArgumentException
- if an unknown routing style is givenMethod Detail |
---|
public byte getBackloopRoutingStyle()
This style is used for routing U-turns of common edges (i.e., edges that are neither self-loops nor same-layer
edges). A U-turn is a non-monotonic part of the edge route that is required for reversed edges if option
IncrementalHierarchicLayouter.setBackloopRoutingEnabled(boolean)
is enabled
or in some other scenarios with port constraints/candidates.
setBackloopRoutingStyle(byte)
public void setBackloopRoutingStyle(byte backloopRoutingStyle)
This style is used for routing U-turns of common edges (i.e., edges that are neither self-loops nor same-layer
edges). A U-turn is a non-monotonic part of the edge route that is required for reversed edges if option
IncrementalHierarchicLayouter.setBackloopRoutingEnabled(boolean)
is enabled
or in some other scenarios with port constraints/candidates.
backloopRoutingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic byte getEdgeGroupRoutingStyle()
More precisely, grouped edges are routed in a bus-style fashion (i.e., the paths of the edges will share a common edge segment) and this option allows to specify the routing style at the bus.
setEdgeGroupRoutingStyle(byte)
public void setEdgeGroupRoutingStyle(byte edgeGroupRoutingStyle)
More precisely, grouped edges are routed in a bus-style fashion (i.e., the paths of the edges will share a common edge segment) and this option allows to specify the routing style at the bus.
edgeGroupRoutingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic byte getDefaultEdgeRoutingStyle()
public void setDefaultEdgeRoutingStyle(byte defaultEdgeRoutingStyle)
defaultEdgeRoutingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic byte getSameLayerEdgeRoutingStyle()
A same-layer edge is an edge whose source/target are assigned to the same layer.
setSameLayerEdgeRoutingStyle(byte)
public void setSameLayerEdgeRoutingStyle(byte sameLayerEdgeRoutingStyle)
A same-layer edge is an edge whose source/target are assigned to the same layer.
sameLayerEdgeRoutingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic byte getSelfloopRoutingStyle()
setSelfloopRoutingStyle(byte)
public void setSelfloopRoutingStyle(byte selfloopRoutingStyle)
selfloopRoutingStyle
- one of the predefined routing styles
java.lang.IllegalArgumentException
- if an unknown routing style is givenpublic byte getSourceCurveConnectionStyle()
CurveConnectionStyle.ORGANIC
, the source port may end up not being on the
side of the node pointing in the main layout direction anymore. For example, the port may be moved to the
left or right side of the node for the default top-to-bottom layout orientation.curved
edge
routing style.setTargetCurveConnectionStyle(byte)
,
setSourceCurveConnectionStyle(byte)
public void setSourceCurveConnectionStyle(byte curveConnectionStyle)
CurveConnectionStyle.ORGANIC
, the source port may end up not being on the
side of the node pointing in the main layout direction anymore. For example, the port may be moved to the
left or right side of the node for the default top-to-bottom layout orientation.curved
edge
routing style.CurveConnectionStyle.KEEP_PORT
. The hierarchic source port and the first segment is kept.curveConnectionStyle
- one of the predefined curve connection styles
java.lang.IllegalArgumentException
- if an unknown connection style is givensetTargetCurveConnectionStyle(byte)
![]() Curved edges with the source and target ports kept as they are in a hierarchic layout | ![]() Organic-like curve connections at source and target side |
public byte getTargetCurveConnectionStyle()
CurveConnectionStyle.ORGANIC
, the target port may end up not being on the
side of the node pointing against the main layout direction anymore. For example, the port may be moved to the
left or right side of the node for the default top-to-bottom layout orientation.curved
edge
routing style.setSourceCurveConnectionStyle(byte)
,
setTargetCurveConnectionStyle(byte)
public void setTargetCurveConnectionStyle(byte curveConnectionStyle)
CurveConnectionStyle.ORGANIC
, the target port may end up not being on the
side of the node pointing against the main layout direction anymore. For example, the port may be moved to the
left or right side of the node for the default top-to-bottom layout orientation.curved
edge
routing style.CurveConnectionStyle.KEEP_PORT
. The hierarchic target port and the last segment is kept.curveConnectionStyle
- one of the predefined curve connection styles
java.lang.IllegalArgumentException
- if an unknown connection style is givensetSourceCurveConnectionStyle(byte)
![]() Curved edges with the source and target ports kept as they are in a hierarchic layout | ![]() Organic-like curve connections at source and target side |
public boolean isControlPointCreationEnabled()
true
if the bends are interpreted as cubic bezier control points, false
otherwisesetControlPointCreationEnabled(boolean)
public void setControlPointCreationEnabled(boolean controlPointCreation)
controlPointCreation
- true
if the points of the edge path should represent cubic
bezier control points, false
otherwise
|
© Copyright 2000-2021, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |