public class EdgeLayoutDescriptor extends Object
EdgeLayoutDescriptor
is used by OrthogonalLayout
to determine the routing details for the edges (e.g.
the segment length).
An EdgeLayoutDescriptor
can be specified individually for each edge by using a IDataProvider
which maps from an Edge
to an EdgeLayoutDescriptor
instance. The IDataProvider
is registered with the graph with key OrthogonalLayout.EDGE_LAYOUT_DESCRIPTOR_DPKEY
.
Constructor and Description |
---|
EdgeLayoutDescriptor()
Creates a new instance of
EdgeLayoutDescriptor with the default settings. |
Modifier and Type | Method and Description |
---|---|
EdgeLayoutDescriptor |
createCopy()
Creates a copy of this
EdgeLayoutDescriptor instance. |
double |
getMinimumFirstSegmentLength()
Gets the minimum length of the first segment of the edge path (at the source node).
|
double |
getMinimumLastSegmentLength()
Gets the minimum length of the last segment of the edge path (at the target node).
|
double |
getMinimumSegmentLength()
Gets the minimum segment length of an edge.
|
void |
setMinimumFirstSegmentLength(double value)
Sets the minimum length of the first segment of the edge path (at the source node).
|
void |
setMinimumLastSegmentLength(double value)
Sets the minimum length of the last segment of the edge path (at the target node).
|
void |
setMinimumSegmentLength(double value)
Sets the minimum segment length of an edge.
|
public EdgeLayoutDescriptor()
EdgeLayoutDescriptor
with the default settings.public EdgeLayoutDescriptor createCopy()
EdgeLayoutDescriptor
instance.EdgeLayoutDescriptor
instancepublic double getMinimumFirstSegmentLength()
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length of the first segment is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.setMinimumFirstSegmentLength(double)
public double getMinimumLastSegmentLength()
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length of the last segment is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.setMinimumLastSegmentLength(double)
public double getMinimumSegmentLength()
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.setMinimumSegmentLength(double)
public void setMinimumFirstSegmentLength(double value)
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length of the first segment is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.value
- the minimum length of the first segmentgetMinimumFirstSegmentLength()
public void setMinimumLastSegmentLength(double value)
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length of the last segment is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.value
- the minimum length of the last segmentgetMinimumLastSegmentLength()
public void setMinimumSegmentLength(double value)
The minimum length must be greater than or equal to 0
.
IllegalArgumentException
- if the minimum length is negativeGridSpacing
). If the grid is larger
than the specified minimum length, then the grid size defines the actual minimum.value
- the minimum segment lengthgetMinimumSegmentLength()