public class TableColumnModel
extends java.lang.Object
TableView
.
Such column information is the relative column width (alias ColumnWeight) and the number of columns
(alias ColumnCount).Constructor and Description |
---|
TableColumnModel(int columnCount)
Creates a new TableColumnModel with the given number of columns.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount()
Gives the column count of this model.
|
int |
getColumnWeight(int columnIndex)
Gives the column weight (the relative width of a column) of the column at the given index.
|
int |
getColumnWeightSum()
Gives the overall column weight (sum of all column weights).
|
void |
setColumnCount(int columnCount)
Sets the column count to this model.
|
void |
setColumnWeight(int columnIndex,
int columnWeight)
Sets the column weight (the relative width of a column) of the column at the given index.
|
public TableColumnModel(int columnCount)
columnCount
- The number of columns.public void setColumnCount(int columnCount)
columnCount
- The number of columns that shall be set.public int getColumnCount()
public void setColumnWeight(int columnIndex, int columnWeight)
columnIndex
- The index of the column to which this weight should be assigned.columnWeight
- The weight that should be set to the column at the given index.public int getColumnWeight(int columnIndex)
columnIndex
- The index of the column to receive the column weight.public int getColumnWeightSum()