Search this API

y.layout.seriesparallel
Class EdgeLayoutDescriptor

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

public class EdgeLayoutDescriptor
extends java.lang.Object

An EdgeLayoutDescriptor provides routing details for an edge that are considered by SeriesParallelLayouter.

Such an EdgeLayoutDescriptor can either be specified for a single edge or shared by several edges. It is assigned by registering a DataProvider with key SeriesParallelLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY. If no DataProvider is registered with this key, a default descriptor is used.

See Also:
SeriesParallelLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY, SeriesParallelLayouter.getDefaultEdgeLayoutDescriptor()
 

Constructor Summary
EdgeLayoutDescriptor()
          Creates a new instance of EdgeLayoutDescriptor with default settings.
 
Method Summary
 EdgeLayoutDescriptor createCopy()
          Creates a copy of this EdgeLayoutDescriptor instance.
 double getMinimumFirstSegmentLength()
          Returns the minimum length for the first segment of the associated edge.
 double getMinimumLastSegmentLength()
          Returns the minimum length for the last segment of the associated edge.
 double getMinimumLength()
          Returns the minimum length for the associated edge.
 void setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
          Specifies the minimum length for the first segment of the associated edge.
 void setMinimumLastSegmentLength(double minimumLastSegmentLength)
          Returns the minimum length for the last segment of the associated edge.
 void setMinimumLength(double minimumLength)
          Specifies the minimum length for the associated edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeLayoutDescriptor

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

Method Detail

getMinimumLength

public double getMinimumLength()
Returns the minimum length for the associated edge.

The minimum length needs to be non-negative.

Returns:
the minimum edge length
See Also:
setMinimumLength(double)

setMinimumLength

public void setMinimumLength(double minimumLength)
Specifies the minimum length for the associated edge.

The minimum length needs to be non-negative.

Default Value:
The default value is 0.
Parameters:
minimumLength - the minimum edge length
Throws:
java.lang.IllegalArgumentException - for negative edge lengths
Sample Graphs:

20

100

getMinimumFirstSegmentLength

public double getMinimumFirstSegmentLength()
Returns the minimum length for the first segment of the associated edge.

The minimum first segment length needs to be non-negative.

Returns:
the minimum first segment length
See Also:
setMinimumFirstSegmentLength(double)

setMinimumFirstSegmentLength

public void setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
Specifies the minimum length for the first segment of the associated edge.

The minimum first segment length needs to be non-negative.

Default Value:
The default value is 15.
Parameters:
minimumFirstSegmentLength - the minimum first segment length
Throws:
java.lang.IllegalArgumentException - for negative minimum segment lengths
Sample Graphs:

15

50

getMinimumLastSegmentLength

public double getMinimumLastSegmentLength()
Returns the minimum length for the last segment of the associated edge.

The minimum last segment length needs to be non-negative.

Returns:
the minimum last segment length
See Also:
setMinimumLastSegmentLength(double)

setMinimumLastSegmentLength

public void setMinimumLastSegmentLength(double minimumLastSegmentLength)
Returns the minimum length for the last segment of the associated edge.

The minimum last segment length needs to be non-negative.

Default Value:
The default value is 15.
Parameters:
minimumLastSegmentLength - the minimum last segment length
Throws:
java.lang.IllegalArgumentException - for negative minimum segment lengths
Sample Graphs:

15

50

createCopy

public EdgeLayoutDescriptor createCopy()
Creates a copy of this EdgeLayoutDescriptor instance.

Returns:
a copy of this EdgeLayoutDescriptor instance

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