Search this API

y.layout.hierarchic.incremental
Class ColumnDescriptor

java.lang.Object
  extended by y.layout.hierarchic.incremental.ColumnDescriptor
All Implemented Interfaces:
Comparable

public class ColumnDescriptor
extends Object
implements Comparable

This class represents a column of a PartitionGrid.
The results of the calculation of the geometry of the column will be placed into the instances of this class after the layout.

See Also:
PartitionGrid

Method Summary
 int compareTo(Object o)
           
 double getComputedPosition()
          Returns the computed position (smaller x-coordinate) of the column after the layout has been calculated.
 double getComputedWidth()
          Returns the computed width of the column after the layout has been calculated.
 int getIndex()
          Returns the index of the column within the partition grid.
 double getLeftInset()
          Returns the left column insets where no element will lie in the resulting drawing.
 double getMinimumWidth()
          Returns the minimum column width.
 double getOriginalPosition()
          Returns the original position (smaller x-coordinate) of the column.
 double getOriginalWidth()
          Returns the original width of the column.
 double getRightInset()
          Returns the right column insets where no element will lie in the resulting drawing.
 double getTightness()
          Returns the tightness factor of the column.
 boolean isIndexFixed()
          Returns whether the index of this column is fixed or whether the algorithm should try to find the best possible position.
 void setComputedPosition(double computedPosition)
          Used to set the computed position (smaller x-coordinate) of the column after the layout has been calculated.
 void setComputedWidth(double computedWidth)
          Used to set the computed width of the column after the layout has been calculated.
 void setIndexFixed(boolean indexFixed)
          Specifies whether a column's index is fixed or whether the index should be chosen automatically in order to minimize edge lengths.
 void setLeftInset(double leftInset)
          Sets the left column insets where no element will lie in the resulting drawing.
 void setMinimumWidth(double minimumWidth)
          Sets the minimum width of the column.
 void setOriginalPosition(double originalPosition)
          Sets the original position (smaller x-coordinate) of the column.
 void setOriginalWidth(double originalWidth)
          Sets the original width of the column.
 void setRightInset(double rightInset)
          Sets the right column insets where no element will lie in the resulting drawing.
 void setTightness(double tightness)
          Sets the tightness factor of the column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIndex

public int getIndex()
Returns the index of the column within the partition grid.

Returns:
the index of the column.

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getMinimumWidth

public double getMinimumWidth()
Returns the minimum column width. The default is 0.0d.

Returns:
the minimum width of a column

setMinimumWidth

public void setMinimumWidth(double minimumWidth)
Sets the minimum width of the column.

Throws:
IllegalArgumentException - if minimumWidth is negative
Parameters:
minimumWidth - the new width

getLeftInset

public double getLeftInset()
Returns the left column insets where no element will lie in the resulting drawing. The default is 0.0d.

Returns:
the left insets

setLeftInset

public void setLeftInset(double leftInset)
Sets the left column insets where no element will lie in the resulting drawing.

Throws:
IllegalArgumentException - if leftInset is negative
Parameters:
leftInset - the new insets

getRightInset

public double getRightInset()
Returns the right column insets where no element will lie in the resulting drawing. The default is 0.0d.

Returns:
the right insets

setRightInset

public void setRightInset(double rightInset)
Sets the right column insets where no element will lie in the resulting drawing.

Throws:
IllegalArgumentException - if rightInset is negative
Parameters:
rightInset - the new insets

getComputedWidth

public double getComputedWidth()
Returns the computed width of the column after the layout has been calculated.

Returns:
the computed width of the column

setComputedWidth

public void setComputedWidth(double computedWidth)
Used to set the computed width of the column after the layout has been calculated.


getOriginalWidth

public double getOriginalWidth()
Returns the original width of the column.


setOriginalWidth

public void setOriginalWidth(double originalWidth)
Sets the original width of the column.


getOriginalPosition

public double getOriginalPosition()
Returns the original position (smaller x-coordinate) of the column.


setOriginalPosition

public void setOriginalPosition(double originalPosition)
Sets the original position (smaller x-coordinate) of the column.


getComputedPosition

public double getComputedPosition()
Returns the computed position (smaller x-coordinate) of the column after the layout has been calculated.

Returns:
the smaller coordinate of the column

setComputedPosition

public void setComputedPosition(double computedPosition)
Used to set the computed position (smaller x-coordinate) of the column after the layout has been calculated.


getTightness

public double getTightness()
Returns the tightness factor of the column. The default is 0.0d.

Returns:
the tightness of the column [0.0d .. 1.0d]
See Also:
setTightness(double)

setTightness

public void setTightness(double tightness)
Sets the tightness factor of the column. The greater the value the more will the column to be forced to be of its minimal possible width. A value of 0.0d will disable compression of the column. A value of 1.0d will try to force the column to be of its minimum width.

Throws:
IllegalArgumentException - if tightness is out of the valid range
Parameters:
tightness - the tightness of the column [0.0d .. 1.0d]

isIndexFixed

public boolean isIndexFixed()
Returns whether the index of this column is fixed or whether the algorithm should try to find the best possible position. The default is true

Returns:
true iff the column's index should not be determined automatically.
See Also:
setIndexFixed(boolean)

setIndexFixed

public void setIndexFixed(boolean indexFixed)
Specifies whether a column's index is fixed or whether the index should be chosen automatically in order to minimize edge lengths.

For all columns where this property is set to true, the relative ordering given by the indices is preserved. The remaining columns may be resorted so that the overall edge lengths are minimized.

By default, this feature is enabled.

Parameters:
indexFixed - true iff the column index should not be determined automatically.
See Also:
isIndexFixed()

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