public class ColumnDescriptor extends Object implements Comparable
partition grid
structure.
The results of the calculation of the geometry of the column will be placed into the instances of this class after the layout.
PartitionGrid
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Compares this
ColumnDescriptor instance with a given other ColumnDescriptor instance based on the
indices of the two instances. |
double |
getComputedPosition()
Gets the computed position (smallest x-coordinate) of the column after the layout has been calculated.
|
double |
getComputedWidth()
Gets the computed width of the column after the layout has been calculated.
|
int |
getIndex()
Gets the index of the column within the
partition grid . |
double |
getLeftInset()
Gets the left column inset in which no element will lie in the resulting layout.
|
double |
getMinimumWidth()
Gets the minimum width of the column.
|
double |
getOriginalPosition()
Gets the original position (smallest x-coordinate) of the column.
|
double |
getOriginalWidth()
Gets the original width of the column.
|
double |
getRightInset()
Gets the right column inset in which no element will lie in the resulting layout.
|
double |
getTightness()
Gets the tightness factor of this column.
|
boolean |
isIndexFixed()
Gets whether the index of the column is fixed or it should be chosen automatically in order to minimize edge lengths.
|
void |
setComputedPosition(double value)
Sets the computed position (smallest x-coordinate) of the column after the layout has been calculated.
|
void |
setComputedWidth(double value)
Sets the computed width of the column after the layout has been calculated.
|
void |
setIndexFixed(boolean value)
Sets whether the index of the column is fixed or it should be chosen automatically in order to minimize edge lengths.
|
void |
setLeftInset(double value)
Sets the left column inset in which no element will lie in the resulting layout.
|
void |
setMinimumWidth(double value)
Sets the minimum width of the column.
|
void |
setOriginalPosition(double value)
Sets the original position (smallest x-coordinate) of the column.
|
void |
setOriginalWidth(double value)
Sets the original width of the column.
|
void |
setRightInset(double value)
Sets the right column inset in which no element will lie in the resulting layout.
|
void |
setTightness(double value)
Sets the tightness factor of this column.
|
public int compareTo(Object o)
ColumnDescriptor
instance with a given other ColumnDescriptor
instance based on the
indices of the two instances.compareTo
in interface Comparable
o
- the ColumnDescriptor
to compare to-1
, 0
or 1
if this ColumnDescriptor
is less than, equal to, or greater than the given
other ColumnDescriptor
public double getComputedPosition()
setComputedPosition(double)
public double getComputedWidth()
The computed width needs to be greater than or equal to 0
.
IllegalArgumentException
- if the computed width is negativesetComputedWidth(double)
public int getIndex()
partition grid
.public double getLeftInset()
The column inset must be greater than or equal to 0
.
IllegalArgumentException
- if the left inset is negativesetLeftInset(double)
public double getMinimumWidth()
The minimum width is defined to be at least 0
.
IllegalArgumentException
- if the minimum width is negativesetMinimumWidth(double)
public double getOriginalPosition()
setOriginalPosition(double)
public double getOriginalWidth()
The original width should be greater than or equal to 0
.
IllegalArgumentException
- if the original width is negativesetOriginalWidth(double)
public double getRightInset()
The column inset must be greater than or equal to 0
.
IllegalArgumentException
- if the right inset is negativesetRightInset(double)
public double getTightness()
This value must lie within the interval [0,1]
.
The larger the value, the more the column will be forced to obtain its minimum width:
0.0d
will disable the compression of the column.1.0d
will try to force the column to obtain its specified minimum width
.IllegalArgumentException
- if the tightness value is outside the interval [0,1]
[0,1]
setTightness(double)
public boolean isIndexFixed()
For all columns where this property is enabled, the relative ordering given by the indices is preserved. The remaining columns may be sorted again so that the overall edge lengths are minimized.
true
. The index of the column is fixed.true
if the column index should be fixed, false
if it may be chosen automaticallysetIndexFixed(boolean)
public void setComputedPosition(double value)
value
- the computed position (smallest x-coordinate)getComputedPosition()
public void setComputedWidth(double value)
The computed width needs to be greater than or equal to 0
.
IllegalArgumentException
- if the computed width is negativevalue
- the computed widthgetComputedWidth()
public void setIndexFixed(boolean value)
For all columns where this property is enabled, the relative ordering given by the indices is preserved. The remaining columns may be sorted again so that the overall edge lengths are minimized.
true
. The index of the column is fixed.value
- true
if the column index should be fixed, false
if it may be chosen automaticallyisIndexFixed()
public void setLeftInset(double value)
The column inset must be greater than or equal to 0
.
IllegalArgumentException
- if the left inset is negativevalue
- the left column insetgetLeftInset()
public void setMinimumWidth(double value)
The minimum width is defined to be at least 0
.
IllegalArgumentException
- if the minimum width is negativevalue
- the minimum column widthgetMinimumWidth()
public void setOriginalPosition(double value)
value
- the original position (smallest x-coordinate)getOriginalPosition()
public void setOriginalWidth(double value)
The original width should be greater than or equal to 0
.
IllegalArgumentException
- if the original width is negativevalue
- the original widthgetOriginalWidth()
public void setRightInset(double value)
The column inset must be greater than or equal to 0
.
IllegalArgumentException
- if the right inset is negativevalue
- the right column insetgetRightInset()
public void setTightness(double value)
This value must lie within the interval [0,1]
.
The larger the value, the more the column will be forced to obtain its minimum width:
0.0d
will disable the compression of the column.1.0d
will try to force the column to obtain its specified minimum width
.IllegalArgumentException
- if the tightness value is outside the interval [0,1]
value
- a tightness value from the interval [0,1]
getTightness()