Search this API

y.layout.hierarchic.incremental
Class RowDescriptor

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

public class RowDescriptor
extends Object
implements Comparable

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

See Also:
PartitionGrid

Method Summary
 int compareTo(Object o)
           
 double getBottomInset()
          Returns the bottom row insets where no element will lie in the resulting drawing.
 double getComputedHeight()
          Returns the computed height of the row after the layout has been calculated.
 double getComputedPosition()
          Returns the computed position (smaller y-coordinate) of the row after the layout has been calculated.
 int getIndex()
          Returns the index of the row within the partition grid.
 double getMinimumHeight()
          Returns the minimum row height.
 double getOriginalHeight()
          Returns the original height of the row.
 double getOriginalPosition()
          Returns the original position (smaller y-coordinate) of the row.
 double getTightness()
          Returns the tightness factor of the row.
 double getTopInset()
          Returns the top row insets where no element will lie in the resulting drawing.
 boolean isIndexFixed()
          Returns whether the index of this row is fixed or whether the algorithm should try to find the best possible position.
 void setBottomInset(double bottomInset)
          Sets the bottom row insets where no element will lie in the resulting drawing.
 void setComputedHeight(double computedHeight)
          Used to set the computed height of the row after the layout has been calculated.
 void setComputedPosition(double computedPosition)
          Used to set the computed position (smaller y-coordinate) of the row after the layout has been calculated.
 void setIndexFixed(boolean indexFixed)
          Specifies whether a row's index is fixed or whether the index should be chosen automatically in order to minimize edge lengths.
 void setMinimumHeight(double minimumHeight)
          Sets the minimum height of the row.
 void setOriginalHeight(double originalHeight)
          Sets the original height of the row.
 void setOriginalPosition(double originalPosition)
          Sets the original position (smaller y-coordinate) of the row.
 void setTightness(double tightness)
          Sets the tightness factor of the row.
 void setTopInset(double topInset)
          Sets the top row insets where no element will lie in the resulting drawing.
 
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 row within the partition grid.

Returns:
the index of the row.

compareTo

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

getMinimumHeight

public double getMinimumHeight()
Returns the minimum row height. The default is 0.0d.

Returns:
the minimum height of a row

setMinimumHeight

public void setMinimumHeight(double minimumHeight)
Sets the minimum height of the row.

Throws:
IllegalArgumentException - if minimumHeight is negative
Parameters:
minimumHeight - the new height

getTopInset

public double getTopInset()
Returns the top row insets where no element will lie in the resulting drawing. The default is 0.0d.

Returns:
the top insets

setTopInset

public void setTopInset(double topInset)
Sets the top row insets where no element will lie in the resulting drawing.

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

getBottomInset

public double getBottomInset()
Returns the bottom row insets where no element will lie in the resulting drawing. The default is 0.0d.

Returns:
the bottom insets

setBottomInset

public void setBottomInset(double bottomInset)
Sets the bottom row insets where no element will lie in the resulting drawing.

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

getComputedHeight

public double getComputedHeight()
Returns the computed height of the row after the layout has been calculated.

Returns:
the computed height of the row

setComputedHeight

public void setComputedHeight(double computedHeight)
Used to set the computed height of the row after the layout has been calculated.


getOriginalPosition

public double getOriginalPosition()
Returns the original position (smaller y-coordinate) of the row.


setOriginalPosition

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


getOriginalHeight

public double getOriginalHeight()
Returns the original height of the row.


setOriginalHeight

public void setOriginalHeight(double originalHeight)
Sets the original height of the row.


getComputedPosition

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

Returns:
the smaller coordinate of the row

setComputedPosition

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


getTightness

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

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

setTightness

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

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

isIndexFixed

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

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

setIndexFixed

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

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

By default, this feature is enabled.

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

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