public class TableColumnPxWidthModel extends java.lang.Object implements TableColumnModel
TableColumnModel implementation holding absolute column widths in pixel.| Constructor and Description |
|---|
TableColumnPxWidthModel(int columnCount)
Creates a new TableColumnModel with the given number of columns.
|
TableColumnPxWidthModel(int columnCount,
int defaultColumnWidthInPx)
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 |
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 |
setColumnWidth(int columnIndex,
int columnWidthInPx)
Sets the column width for the column at the given index.
|
public TableColumnPxWidthModel(int columnCount)
columnCount - The number of columns.public TableColumnPxWidthModel(int columnCount,
int defaultColumnWidthInPx)
columnCount - The number of columns.defaultColumnWidthInPx - The default width of columns in pixels.public void setColumnWidth(int columnIndex,
int columnWidthInPx)
columnIndex - The index of the column.columnWidthInPx - The width of the column in pixel.public void setColumnCount(int columnCount)
TableColumnModelsetColumnCount in interface TableColumnModelcolumnCount - The number of columns that shall be set.public int getColumnCount()
TableColumnModelgetColumnCount in interface TableColumnModelpublic 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.