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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(TableColumn aColumn) void
void
addHiddenColumn
(TableColumn aColumn) Adds a table column to this model that is not visible default.protected TableColumnModelState
This returns all columns known by this model, both visible and not seen.getColumn
(int columnIndex) int
int
getColumnIndex
(Object columnIdentifier) int
getColumnIndexAtX
(int x) int
boolean
protected GTable
int
int[]
int
boolean
isVisible
(int modelIndex) Returns true if the column at the given index is visible.boolean
isVisible
(TableColumn column) Returns true if the given column is visible.void
moveColumn
(int columnIndex, int newIndex) void
void
removeColumn
(TableColumn column) void
void
restoreFromXML
(org.jdom.Element element) org.jdom.Element
void
setColumnMargin
(int newMargin) void
setColumnSelectionAllowed
(boolean flag) void
setSelectionModel
(ListSelectionModel newModel) void
setVisible
(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:
addColumn
in 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:
addColumnModelListener
in interfaceTableColumnModel
-
getColumn
- Specified by:
getColumn
in interfaceTableColumnModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceTableColumnModel
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceTableColumnModel
-
getColumnIndexAtX
public int getColumnIndexAtX(int x) - Specified by:
getColumnIndexAtX
in interfaceTableColumnModel
-
getColumnMargin
public int getColumnMargin()- Specified by:
getColumnMargin
in interfaceTableColumnModel
-
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()- Specified by:
getColumnSelectionAllowed
in interfaceTableColumnModel
-
getColumns
- Specified by:
getColumns
in 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:
getSelectedColumnCount
in interfaceTableColumnModel
-
getSelectedColumns
public int[] getSelectedColumns()- Specified by:
getSelectedColumns
in interfaceTableColumnModel
-
getSelectionModel
- Specified by:
getSelectionModel
in interfaceTableColumnModel
-
getTotalColumnWidth
public int getTotalColumnWidth()- Specified by:
getTotalColumnWidth
in interfaceTableColumnModel
-
moveColumn
public void moveColumn(int columnIndex, int newIndex) - Specified by:
moveColumn
in interfaceTableColumnModel
-
removeColumn
- Specified by:
removeColumn
in interfaceTableColumnModel
-
removeColumnModelListener
- Specified by:
removeColumnModelListener
in interfaceTableColumnModel
-
setColumnMargin
public void setColumnMargin(int newMargin) - Specified by:
setColumnMargin
in interfaceTableColumnModel
-
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag) - Specified by:
setColumnSelectionAllowed
in interfaceTableColumnModel
-
setSelectionModel
- Specified by:
setSelectionModel
in interfaceTableColumnModel
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
valueChanged
- Specified by:
valueChanged
in interfaceListSelectionListener
-
saveToXML
public org.jdom.Element saveToXML() -
restoreFromXML
public void restoreFromXML(org.jdom.Element element)
-