Search this API

y.layout.orthogonal
Class EdgeLayoutDescriptor

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

public class EdgeLayoutDescriptor
extends Object

This class is used by OrthogonalLayouter, DirectedOrthogonalLayouter and OrthogonalGroupLayouter to determine the routing details of the graph's edges.

See Also:
OrthogonalLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY, DirectedOrthogonalLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY, OrthogonalGroupLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY

Constructor Summary
EdgeLayoutDescriptor()
          Creates a new instance of an EdgeLayoutDescriptor using the default values.
 
Method Summary
 EdgeLayoutDescriptor createCopy()
          Creates a copy of this instance.
 double getMinimumFirstSegmentLength()
          Returns the minimum length of the first segment (at the source).
 double getMinimumLastSegmentLength()
          Returns the minimum length of the last segment (at the target).
 double getMinimumSegmentLength()
          Returns the minimum segment length of the edge.
 void setMinimumFirstSegmentLength(double length)
          Sets the minimum length of the first segment (at the source).
 void setMinimumLastSegmentLength(double length)
          Sets the minimum length of the last segment (at the target).
 void setMinimumSegmentLength(double length)
          Sets the minimum segment length of an 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 an EdgeLayoutDescriptor using the default values.

Method Detail

setMinimumFirstSegmentLength

public void setMinimumFirstSegmentLength(double length)
Sets the minimum length of the first segment (at the source). Note: the resulting segment length also depends on the given grid size (see OrthogonalLayouter.setGrid(int)), i.e., segment length >= (int) Math.ceil(length / grid size).

Parameters:
length - the minimum length of the first segment

getMinimumFirstSegmentLength

public double getMinimumFirstSegmentLength()
Returns the minimum length of the first segment (at the source). Default is 15.0d.

Returns:
the length of the first segment

setMinimumLastSegmentLength

public void setMinimumLastSegmentLength(double length)
Sets the minimum length of the last segment (at the target). Note: the resulting segment length also depends on the given grid size (see OrthogonalLayouter.setGrid(int)), i.e., segment length >= (int) Math.ceil(length / grid size).

Parameters:
length - the minimum length of the last segment

getMinimumLastSegmentLength

public double getMinimumLastSegmentLength()
Returns the minimum length of the last segment (at the target). Default is 15.0d.

Returns:
the length of the last segment

setMinimumSegmentLength

public void setMinimumSegmentLength(double length)
Sets the minimum segment length of an edge. Note: the resulting segment length also depends on the given grid size (see OrthogonalLayouter.setGrid(int)), i.e., segment length >= (int) Math.ceil(length / grid size).

Parameters:
length - the minimum segment length.

getMinimumSegmentLength

public double getMinimumSegmentLength()
Returns the minimum segment length of the edge. Default is 15.0d.

Returns:
the minimum segment length of the edge

createCopy

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

Returns:
the copy.

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