Package docking.widgets.trable
Class GTrableColumnModel<T>
java.lang.Object
docking.widgets.trable.GTrableColumnModel<T>
- Type Parameters:
T- the row object type
Abstract base class for
GTrable column models-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intGTrableColumn<T, ?> getColumn(int column) Returns the column object for the given column index..intReturns the number of columns in this model..protected intgetIndex(int x) intReturns the preferred width of the model which is the sum of the preferred widths of each column..protected intgetWidth()protected voidprotected abstract voidpopulateColumns(List<GTrableColumn<T, ?>> columnList) Subclasses implement this method to define the columns for this model.protected voidprotected voidprotected voidsetWidth(int newWidth)
-
Constructor Details
-
GTrableColumnModel
public GTrableColumnModel()
-
-
Method Details
-
getColumnCount
public int getColumnCount()Returns the number of columns in this model..- Returns:
- the number of columns in this model.
-
getColumn
Returns the column object for the given column index..- Parameters:
column- the index of the column- Returns:
- the column object for the given column index.
-
getPreferredWidth
public int getPreferredWidth()Returns the preferred width of the model which is the sum of the preferred widths of each column..- Returns:
- the preferred width of the model which is the sum of the preferred widths of each column.
-
computeWidth
protected int computeWidth() -
reloadColumns
protected void reloadColumns() -
populateColumns
Subclasses implement this method to define the columns for this model.- Parameters:
columnList- a list to populate with column objects
-
removeAllColumns
protected void removeAllColumns() -
getWidth
protected int getWidth() -
getIndex
protected int getIndex(int x) -
setWidth
protected void setWidth(int newWidth) -
modelColumnsChaged
protected void modelColumnsChaged()
-