|
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.EdgeLayoutDescriptor
public class EdgeLayoutDescriptor
This class is used by HierarchicLayouter
during the various phases to provide routing details for the
edges of the graph.
An EdgeLayoutDescriptor
instance can be specified individually for single edges using a
DataProvider
that returns an EdgeLayoutDescriptor
instance for each edge of the graph, or
null
if no EdgeLayoutDescriptor
is bound to an edge. The DataProvider
is
registered with the graph using key HierarchicLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY
.
This class is designed as a class to allow future additions of new getter methods.
HierarchicLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY
,
NodeLayoutDescriptor
![]() |
![]() |
![]() |
![]() |
Field Summary | |
---|---|
static int |
RECURSIVE_EDGE_STYLE_DIRECTED
Routing specifier that routes edges between different group contents recursively and directed. |
static int |
RECURSIVE_EDGE_STYLE_OFF
Routing specifier that routes edges between different group contents non-recursively. |
static int |
RECURSIVE_EDGE_STYLE_UNDIRECTED
Routing specifier that routes edges between different group contents recursively and undirected. |
Constructor Summary | |
---|---|
EdgeLayoutDescriptor()
Creates a new instance of an EdgeLayoutDescriptor with the default values. |
Method Summary | |
---|---|
EdgeLayoutDescriptor |
createCopy()
Creates a copy of this EdgeLayoutDescriptor instance. |
double |
getMinimumDistance()
Returns the preferred minimum distance to obstacles. |
double |
getMinimumFirstSegmentLength()
Returns the minimum length of the first segment of the edge path (at the source node). |
double |
getMinimumLastSegmentLength()
Returns the minimum length of the last segment of the edge path (at the target node). |
double |
getMinimumLength()
Returns the minimum length of an edge. |
double |
getMinimumSlope()
Returns the minimum slope that the mid segments of this edge should have, if the edge is routed polyline in vertical layouts. |
double |
getMinOctilinearSegmentLength()
Returns the minimum length of octilinear segments for this edge. |
int |
getRecursiveEdgeStyle()
Returns how edges in grouped graphs are routed between the content of different groups. |
RoutingStyle |
getRoutingStyle()
Returns the routing style for this edge. |
boolean |
isDirectGroupContentEdgeRoutingEnabled()
Returns whether or not this edge is routed directly to a group node's border if it connects the group node with one of its descendants. |
boolean |
isOrthogonallyRouted()
Deprecated. Replaced by getRoutingStyle() . |
boolean |
isSourcePortOptimizationEnabled()
Returns whether or not source port optimization is enabled. |
boolean |
isTargetPortOptimizationEnabled()
Returns whether or not target port optimization is enabled. |
void |
setDirectGroupContentEdgeRoutingEnabled(boolean enabled)
Specifies whether or not this edge is routed directly to a group node's border if it connects the group node with one of its descendants. |
void |
setMinimumDistance(double distance)
Specifies the preferred minimum distance to obstacles. |
void |
setMinimumFirstSegmentLength(double length)
Specifies the minimum length of the first segment of the edge path (at the source node). |
void |
setMinimumLastSegmentLength(double length)
Specifies the minimum length of the last segment of the edge path (at the target node). |
void |
setMinimumLength(double length)
Specifies the minimum length of an edge. |
void |
setMinimumSlope(double slope)
Specifies the minimum slope that the mid segments of this edge should have, if the edge is routed polyline in vertical layouts. |
void |
setMinOctilinearSegmentLength(double minOctilinearSegmentLength)
Specifies the minimum length of octilinear segments for this edge. |
void |
setOrthogonallyRouted(boolean orthogonal)
Deprecated. Replaced by setRoutingStyle(RoutingStyle) . |
void |
setRecursiveEdgeStyle(int recursiveEdgeStyle)
Specifies how edges in grouped graphs are routed between the content of different groups. |
void |
setRoutingStyle(RoutingStyle routingStyle)
Specifies the routing style for this edge. |
void |
setSourcePortOptimizationEnabled(boolean enable)
Specifies whether or not source port optimization is enabled. |
void |
setTargetPortOptimizationEnabled(boolean enable)
Specifies whether or not target port optimization is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RECURSIVE_EDGE_STYLE_OFF
Edge
s may leave and enter group nodes at the left and right side in order to connect as directly as
possible.
public static final int RECURSIVE_EDGE_STYLE_DIRECTED
Edge
s can only leave the groups at the bottom side and enter them at the top side.
public static final int RECURSIVE_EDGE_STYLE_UNDIRECTED
Edge
s can leave the groups at the bottom or top side and enter them at the bottom or top side. This
style is more compact than the directed edge style.
Constructor Detail |
---|
public EdgeLayoutDescriptor()
EdgeLayoutDescriptor
with the default values.
Method Detail |
---|
public void setMinimumFirstSegmentLength(double length)
The minimum length should be greater than 0
.
If the value is 0.0d
the first segment does not need to be orthogonal.
curve connection
style
CurveConnectionStyle.ORGANIC
.length
- the minimum length of the first segment
java.lang.IllegalArgumentException
- if the minimum length of the first segment is negative![]() Minimum first segment length 10 | ![]() Minimum first segment length 50 |
public double getMinimumFirstSegmentLength()
The minimum length should be greater than 0
.
If the value is 0.0d
the first segment does not need to be orthogonal.
curve connection
style
CurveConnectionStyle.ORGANIC
.setMinimumFirstSegmentLength(double)
public void setMinimumLastSegmentLength(double length)
The minimum length should be greater than 0
.
If the value is 0.0d
the last segment does not need to be orthogonal.
curve connection
style
CurveConnectionStyle.ORGANIC
.length
- the minimum length of the last segment
java.lang.IllegalArgumentException
- if the minimum length of the last segment is negative![]() Minimum last segment length 10 | ![]() Minimum last segment length 50 |
public double getMinimumLastSegmentLength()
The minimum length should be greater than 0
.
If the value is 0.0d
the last segment does not need to be orthogonal.
curve connection
style
CurveConnectionStyle.ORGANIC
.setMinimumLastSegmentLength(double)
public void setMinimumLength(double length)
If this is used for polyline routing, it describes the minimum vertical length of the mid segment. If it is used for orthogonal routing, it describes the minimum length of the whole edge (i.e., the sum of the length of all segments).
The minimum length should be greater than 0
.
public double getMinimumLength()
If this is used for polyline routing, it describes the minimum vertical length of the mid segment. If it is used for orthogonal routing, it describes the minimum length of the whole edge (i.e., the sum of the length of all segments).
The minimum length should be greater than 0
.
setMinimumLength(double)
public void setMinimumDistance(double distance)
The minimum distance should be greater than 0
.
public double getMinimumDistance()
The minimum distance should be greater than 0
.
setMinimumDistance(double)
public void setMinimumSlope(double slope)
curved
edges.
The minimum slope should be greater than 0
.
For the curved routing style, larger values lead to steeper curves. Steeper curves generally require more
height but less width (vertical layout direction).
slope
- the minimum slope
java.lang.IllegalArgumentException
- if the given minimum slope is negative![]() Routing style polyline and minimum slope 0.25d | ![]() Routing style polyline and minimum slope 2.0d | ![]() Routing style curved and minimum slope 0.1 | ![]() Routing style curved and minimum slope 0.5 | ![]() Steepness 1.5 |
public double getMinimumSlope()
curved
edges.
The minimum slope should be greater than 0
.
For the curved routing style, larger values lead to steeper curves. Steeper curves generally require more
height but less width (vertical layout direction).
setMinimumSlope(double)
public boolean isSourcePortOptimizationEnabled()
This means that the algorithm should try to find a better source port constraint
if the current constraint is null
or PortConstraint.ANY_SIDE
.
true
if source port optimization is enabled, false
otherwisesetSourcePortOptimizationEnabled(boolean)
public void setSourcePortOptimizationEnabled(boolean enable)
This means that the algorithm should try to find a better source port constraint
if the current constraint is null
or PortConstraint.ANY_SIDE
.
enable
- true
if source port optimization should be enabled, false
otherwisepublic boolean isTargetPortOptimizationEnabled()
This means that the algorithm should try to find a better target port constraint
if the current constraint is null
or PortConstraint.ANY_SIDE
.
true
if target port optimization should be enabled, false
otherwisesetTargetPortOptimizationEnabled(boolean)
public void setTargetPortOptimizationEnabled(boolean enable)
This means that the algorithm should try to find a better target port constraint
if the current constraint is null
or PortConstraint.ANY_SIDE
.
enable
- true
if target port optimization should be enabled, false
otherwisepublic void setOrthogonallyRouted(boolean orthogonal)
setRoutingStyle(RoutingStyle)
.
This does not affect the routing of bus-like structures.
orthogonal
- true
if his edge should be routed orthogonally, false
otherwisepublic boolean isOrthogonallyRouted()
getRoutingStyle()
.
This does not affect the routing of bus-like structures.
true
if his edge should be routed orthogonally, false
otherwisepublic RoutingStyle getRoutingStyle()
RoutingStyle
instancesetRoutingStyle(RoutingStyle)
,
RoutingStyle
public void setRoutingStyle(RoutingStyle routingStyle)
public double getMinOctilinearSegmentLength()
routing style
is
octilinear
.setMinOctilinearSegmentLength(double)
,
setRoutingStyle(RoutingStyle)
public void setMinOctilinearSegmentLength(double minOctilinearSegmentLength)
routing style
is
octilinear
.minOctilinearSegmentLength
- the minimum length of octilinear segment
java.lang.IllegalArgumentException
- if the minimum length of the first segment is negativesetRoutingStyle(RoutingStyle)
![]() Minimum octilinear segment length 20 | ![]() Minimum octilinear segment length 100 |
public EdgeLayoutDescriptor createCopy()
EdgeLayoutDescriptor
instance.
EdgeLayoutDescriptor
instancepublic int getRecursiveEdgeStyle()
direct routing between groups and their content
is enabled, such an edge may not be strictly recursive anymore. Edges may leave/enter group nodes left or
right.bus structure
can not be recursive at the same time.setRecursiveEdgeStyle(int)
public void setRecursiveEdgeStyle(int recursiveEdgeStyle)
direct routing between groups and their content
is enabled, such an edge may not be strictly recursive anymore. Edges may leave/enter group nodes left or
right.bus structure
can not be recursive at the same time.RECURSIVE_EDGE_STYLE_OFF
. Edges are not routed recursively.recursiveEdgeStyle
- one of the predefined recursive routing styles
java.lang.IllegalArgumentException
- if an unknown style is specified![]() RECURSIVE_EDGE_STYLE_OFF | ![]() RECURSIVE_EDGE_STYLE_DIRECTED | ![]() RECURSIVE_EDGE_STYLE_UNDIRECTED |
public boolean isDirectGroupContentEdgeRoutingEnabled()
When enabled, the edge will connect to the inner side of the group node's border instead of leaving the group node and connect from outside.
true
if the edge is routed directly, false
otherwisesetDirectGroupContentEdgeRoutingEnabled(boolean)
public void setDirectGroupContentEdgeRoutingEnabled(boolean enabled)
When enabled, the edge will connect to the inner side of the group node's border instead of leaving the group node and connect from outside.
enabled
- true
if the edge is routed directly, false
otherwise![]() false | ![]() true |
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |