Package com.illumon.iris.gui.table
Class GuiTableMap
java.lang.Object
javax.swing.table.AbstractTableModel
com.illumon.iris.gui.table.IrisTableModel
com.illumon.iris.gui.table.GuiTableMap
- All Implemented Interfaces:
ExtendableTableInterface
,MultiModelTable
,UpdateListener
,Workspace
,Serializable
,TableModel
- Direct Known Subclasses:
FilteredTableModel
,InputOverlayTableModel
,SortedTableModel
public abstract class GuiTableMap extends IrisTableModel implements MultiModelTable, ExtendableTableInterface
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ExtendableTableInterface
ExtendableTableInterface.Entry, ExtendableTableInterface.PartialResult
-
Field Summary
Fields Modifier and Type Field Description protected IrisTableModel
model_
protected IrisTableModel
originalTableModel_
-
Constructor Summary
Constructors Constructor Description GuiTableMap(com.fishlib.io.logger.Logger log, IrisTableModel model)
-
Method Summary
Modifier and Type Method Description ExtendableTableInterface.PartialResult
beginAddColumns(List<ExtendableTableInterface.Entry> columnDefinitions)
Begin the process of setting extended columns.void
finishAddColumns(ExtendableTableInterface.PartialResult partialResult)
Incorporate the new DBTable and columns into tables and models.Class
getColumnClass(int aColumn)
int
getColumnCount()
String
getColumnName(int aColumn)
List<ExtendableTableInterface.Entry>
getExtendedColumns()
get all extended columns and definitionsabstract int
getMappedRowIndex(int index)
IrisTableModel
getModel()
return the single child model, or null if none<T extends TableModel>
TgetModel(Class<T> modelType)
return a model of type modelType, or null if noneIrisTableModel
getOriginalModel()
int
getOriginalRowIndex(int index)
int[]
getOriginalRowIndices(int[] index)
int[]
getOriginalRowIndices(int[] index, boolean sorted)
int
getRowCount()
Set<String>
getSortableColumns()
Object
getValueAt(int aRow, int aColumn)
org.jdom2.Element
getWorkspaceInfo()
Serialize the class into an element to be stored in the workspaceboolean
isCellEditable(int row, int column)
boolean
isStale(int row, int col)
Runnable
popFinishedCallback()
get the current callback value.void
setColumnSet(com.fishlib.dataobjects.WColumnSet columnSet)
void
setFinishedCallback(Runnable r)
set a callback to be called on the swing thread sometime after finishAddColumnsvoid
setValueAt(Object aValue, int aRow, int aColumn)
void
setWorkspaceInfo(org.jdom2.Element workspaceInfo)
Restore the class to the state defined by the data persisted in workspaceInfoboolean
supportsColumnChange()
determine whether this instance supports column change.Methods inherited from class com.illumon.iris.gui.table.IrisTableModel
dispose, getColumnIndex, getColumnSet, getNonViewColumnSet, getTableModelName, processUpdate, registerAsUpdateListener
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
Constructor Details
-
Method Details
-
getModel
Description copied from interface:MultiModelTable
return the single child model, or null if none- Specified by:
getModel
in interfaceMultiModelTable
-
getOriginalModel
- Specified by:
getOriginalModel
in interfaceMultiModelTable
-
getModel
Description copied from interface:MultiModelTable
return a model of type modelType, or null if none- Specified by:
getModel
in interfaceMultiModelTable
-
getMappedRowIndex
public abstract int getMappedRowIndex(int index) -
isStale
public boolean isStale(int row, int col)- Overrides:
isStale
in classIrisTableModel
-
getOriginalRowIndex
public int getOriginalRowIndex(int index) -
getOriginalRowIndices
public int[] getOriginalRowIndices(int[] index)- Specified by:
getOriginalRowIndices
in interfaceMultiModelTable
-
getOriginalRowIndices
public int[] getOriginalRowIndices(int[] index, boolean sorted)- Specified by:
getOriginalRowIndices
in interfaceMultiModelTable
-
getValueAt
- Specified by:
getValueAt
in interfaceTableModel
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceTableModel
- Overrides:
getColumnCount
in classIrisTableModel
-
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classIrisTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classIrisTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column)- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setColumnSet
public void setColumnSet(com.fishlib.dataobjects.WColumnSet columnSet)- Overrides:
setColumnSet
in classIrisTableModel
-
supportsColumnChange
public boolean supportsColumnChange()determine whether this instance supports column change. Some subclasses support this in all cases, others only sometimes.- Specified by:
supportsColumnChange
in interfaceExtendableTableInterface
- Returns:
- true if it is valid to call addColumns
-
beginAddColumns
public ExtendableTableInterface.PartialResult beginAddColumns(List<ExtendableTableInterface.Entry> columnDefinitions)Description copied from interface:ExtendableTableInterface
Begin the process of setting extended columns. This will create and return a new DBTable via updateView, with new columns. Implementations must not touch Swing components, and callers must not invoke this on the Swing event thread.- Specified by:
beginAddColumns
in interfaceExtendableTableInterface
- Parameters:
columnDefinitions
- list of column name/definition entries to add- Returns:
- PartialResult containing intermediate results to be passed to finishAddColumns
-
finishAddColumns
Description copied from interface:ExtendableTableInterface
Incorporate the new DBTable and columns into tables and models. This must not be called on the Swing event thread.- Specified by:
finishAddColumns
in interfaceExtendableTableInterface
- Parameters:
partialResult
- intermediate results from beginAddColumns
-
getExtendedColumns
Description copied from interface:ExtendableTableInterface
get all extended columns and definitions- Specified by:
getExtendedColumns
in interfaceExtendableTableInterface
- Returns:
- list of name/definition pairs.
-
getWorkspaceInfo
public org.jdom2.Element getWorkspaceInfo()Description copied from interface:Workspace
Serialize the class into an element to be stored in the workspace- Specified by:
getWorkspaceInfo
in interfaceWorkspace
- Overrides:
getWorkspaceInfo
in classIrisTableModel
- Returns:
- An
Element
containing the data to persist.
-
setWorkspaceInfo
public void setWorkspaceInfo(org.jdom2.Element workspaceInfo)Description copied from interface:Workspace
Restore the class to the state defined by the data persisted in workspaceInfo- Specified by:
setWorkspaceInfo
in interfaceWorkspace
- Overrides:
setWorkspaceInfo
in classIrisTableModel
- Parameters:
workspaceInfo
- AnElement
containing the persisted state.
-
setFinishedCallback
Description copied from interface:ExtendableTableInterface
set a callback to be called on the swing thread sometime after finishAddColumns- Specified by:
setFinishedCallback
in interfaceExtendableTableInterface
- Parameters:
r
- Runnable to be called after finishAddColumns
-
popFinishedCallback
Description copied from interface:ExtendableTableInterface
get the current callback value. set the callback to null- Specified by:
popFinishedCallback
in interfaceExtendableTableInterface
- Returns:
- current callback, if any
-
getSortableColumns
- Overrides:
getSortableColumns
in classIrisTableModel
-