Package docking.widgets.table
Class GTableColumnModel
java.lang.Object
docking.widgets.table.GTableColumnModel
- All Implemented Interfaces:
PropertyChangeListener,EventListener,ListSelectionListener,TableColumnModel
public class GTableColumnModel
extends Object
implements TableColumnModel, PropertyChangeListener, ListSelectionListener
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(TableColumn aColumn) voidvoidaddHiddenColumn(TableColumn aColumn) Adds a table column to this model that is not visible default.protected TableColumnModelStateThis returns all columns known by this model, both visible and not seen.getColumn(int columnIndex) intintgetColumnIndex(Object columnIdentifier) intgetColumnIndexAtX(int x) intbooleanprotected GTableintint[]intbooleanisVisible(int modelIndex) Returns true if the column at the given index is visible.booleanisVisible(TableColumn column) Returns true if the given column is visible.voidmoveColumn(int columnIndex, int newIndex) voidvoidremoveColumn(TableColumn column) voidvoidrestoreFromXML(org.jdom.Element element) org.jdom.ElementvoidsetColumnMargin(int newMargin) voidsetColumnSelectionAllowed(boolean flag) voidsetSelectionModel(ListSelectionModel newModel) voidsetVisible(TableColumn column, boolean visible) void
-
Field Details
-
selectionModel
-
-
Method Details
-
createTableColumnModelState
-
getGTable
-
isVisible
Returns true if the given column is visible.- Parameters:
column- The column for which to check visibility.- Returns:
- true if the given column is visible.
-
isVisible
public boolean isVisible(int modelIndex) Returns true if the column at the given index is visible. This call is handy when checking for visibility when dealing with model data that knows nothing about the hidden columns.- Parameters:
modelIndex- The column index for which to check visibility. This is the model's index and not the table's index.- Returns:
- true if the given column is visible.
-
setVisible
-
addColumn
- Specified by:
addColumnin interfaceTableColumnModel
-
addHiddenColumn
Adds a table column to this model that is not visible default. This column may be made visible later by the user or by the system restoring a previously used visible column state.- Parameters:
aColumn- the column
-
addColumnModelListener
- Specified by:
addColumnModelListenerin interfaceTableColumnModel
-
getColumn
- Specified by:
getColumnin interfaceTableColumnModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableColumnModel
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceTableColumnModel
-
getColumnIndexAtX
public int getColumnIndexAtX(int x) - Specified by:
getColumnIndexAtXin interfaceTableColumnModel
-
getColumnMargin
public int getColumnMargin()- Specified by:
getColumnMarginin interfaceTableColumnModel
-
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()- Specified by:
getColumnSelectionAllowedin interfaceTableColumnModel
-
getColumns
- Specified by:
getColumnsin interfaceTableColumnModel
-
getAllColumns
This returns all columns known by this model, both visible and not seen.- Returns:
- all columns known by this model, both visible and not seen.
-
getSelectedColumnCount
public int getSelectedColumnCount()- Specified by:
getSelectedColumnCountin interfaceTableColumnModel
-
getSelectedColumns
public int[] getSelectedColumns()- Specified by:
getSelectedColumnsin interfaceTableColumnModel
-
getSelectionModel
- Specified by:
getSelectionModelin interfaceTableColumnModel
-
getTotalColumnWidth
public int getTotalColumnWidth()- Specified by:
getTotalColumnWidthin interfaceTableColumnModel
-
moveColumn
public void moveColumn(int columnIndex, int newIndex) - Specified by:
moveColumnin interfaceTableColumnModel
-
removeColumn
- Specified by:
removeColumnin interfaceTableColumnModel
-
removeColumnModelListener
- Specified by:
removeColumnModelListenerin interfaceTableColumnModel
-
setColumnMargin
public void setColumnMargin(int newMargin) - Specified by:
setColumnMarginin interfaceTableColumnModel
-
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag) - Specified by:
setColumnSelectionAllowedin interfaceTableColumnModel
-
setSelectionModel
- Specified by:
setSelectionModelin interfaceTableColumnModel
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
valueChanged
- Specified by:
valueChangedin interfaceListSelectionListener
-
saveToXML
public org.jdom.Element saveToXML() -
restoreFromXML
public void restoreFromXML(org.jdom.Element element)
-