public class TableColumnWeightModel extends java.lang.Object implements TableColumnModel
TableView.
Such column information is the relative column width (alias ColumnWeight) and the number of columns
(alias ColumnCount).| Constructor and Description |
|---|
TableColumnWeightModel(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).
|
int |
getColumnWidth(int columnIndex,
int tableWidthInPx)
Gives the column width of the given index.
|
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 TableColumnWeightModel(int columnCount)
columnCount - The number of columns.public int getColumnCount()
TableColumnModelgetColumnCount in interface TableColumnModelpublic void setColumnCount(int columnCount)
TableColumnModelsetColumnCount in interface TableColumnModelcolumnCount - The number of columns that shall be set.public int getColumnWidth(int columnIndex,
int tableWidthInPx)
TableColumnModelgetColumnWidth in interface TableColumnModelcolumnIndex - The index of the column.tableWidthInPx - The width of the table where it should be used.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()