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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ExtendableTableInterface
ExtendableTableInterface.Entry, ExtendableTableInterface.PartialResult -
Field Summary
FieldsFields inherited from class com.illumon.iris.gui.table.IrisTableModel
columnSet_, nonViewColumnSet_Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginAddColumns(List<ExtendableTableInterface.Entry> columnDefinitions) Begin the process of setting extended columns.voidfinishAddColumns(ExtendableTableInterface.PartialResult partialResult) Incorporate the new DBTable and columns into tables and models.getColumnClass(int aColumn) intgetColumnName(int aColumn) get all extended columns and definitionsabstract intgetMappedRowIndex(int index) getModel()return the single child model, or null if none<T extends TableModel>
Treturn a model of type modelType, or null if noneintgetOriginalRowIndex(int index) int[]getOriginalRowIndices(int[] index) int[]getOriginalRowIndices(int[] index, boolean sorted) intgetValueAt(int aRow, int aColumn) org.jdom2.ElementSerialize the class into an element to be stored in the workspacebooleanisCellEditable(int row, int column) booleanisStale(int row, int col) get the current callback value.voidsetColumnSet(com.fishlib.dataobjects.WColumnSet columnSet) voidset a callback to be called on the swing thread sometime after finishAddColumnsvoidsetValueAt(Object aValue, int aRow, int aColumn) voidsetWorkspaceInfo(org.jdom2.Element workspaceInfo) Restore the class to the state defined by the data persisted in workspaceInfobooleandetermine whether this instance supports column change.Methods inherited from class com.illumon.iris.gui.table.IrisTableModel
dispose, getColumnIndex, getColumnSet, getNonViewColumnSet, getTableModelName, processUpdate, registerAsUpdateListenerMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.gui.workspace.Workspace
isGlobalSetting
-
Field Details
-
model_
-
originalTableModel_
-
-
Constructor Details
-
GuiTableMap
-
-
Method Details
-
getModel
Description copied from interface:MultiModelTablereturn the single child model, or null if none- Specified by:
getModelin interfaceMultiModelTable
-
getOriginalModel
- Specified by:
getOriginalModelin interfaceMultiModelTable
-
getModel
Description copied from interface:MultiModelTablereturn a model of type modelType, or null if none- Specified by:
getModelin interfaceMultiModelTable
-
getMappedRowIndex
public abstract int getMappedRowIndex(int index) -
isStale
public boolean isStale(int row, int col) - Overrides:
isStalein classIrisTableModel
-
getOriginalRowIndex
public int getOriginalRowIndex(int index) -
getOriginalRowIndices
public int[] getOriginalRowIndices(int[] index) - Specified by:
getOriginalRowIndicesin interfaceMultiModelTable
-
getOriginalRowIndices
public int[] getOriginalRowIndices(int[] index, boolean sorted) - Specified by:
getOriginalRowIndicesin interfaceMultiModelTable
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classIrisTableModel
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classIrisTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classIrisTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
setColumnSet
public void setColumnSet(com.fishlib.dataobjects.WColumnSet columnSet) - Overrides:
setColumnSetin classIrisTableModel
-
supportsColumnChange
public boolean supportsColumnChange()determine whether this instance supports column change. Some subclasses support this in all cases, others only sometimes.- Specified by:
supportsColumnChangein interfaceExtendableTableInterface- Returns:
- true if it is valid to call addColumns
-
beginAddColumns
public ExtendableTableInterface.PartialResult beginAddColumns(List<ExtendableTableInterface.Entry> columnDefinitions) Description copied from interface:ExtendableTableInterfaceBegin 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:
beginAddColumnsin 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:ExtendableTableInterfaceIncorporate the new DBTable and columns into tables and models. This must not be called on the Swing event thread.- Specified by:
finishAddColumnsin interfaceExtendableTableInterface- Parameters:
partialResult- intermediate results from beginAddColumns
-
getExtendedColumns
Description copied from interface:ExtendableTableInterfaceget all extended columns and definitions- Specified by:
getExtendedColumnsin interfaceExtendableTableInterface- Returns:
- list of name/definition pairs.
-
getWorkspaceInfo
public org.jdom2.Element getWorkspaceInfo()Description copied from interface:WorkspaceSerialize the class into an element to be stored in the workspace- Specified by:
getWorkspaceInfoin interfaceWorkspace- Overrides:
getWorkspaceInfoin classIrisTableModel- Returns:
- An
Elementcontaining the data to persist.
-
setWorkspaceInfo
public void setWorkspaceInfo(org.jdom2.Element workspaceInfo) Description copied from interface:WorkspaceRestore the class to the state defined by the data persisted in workspaceInfo- Specified by:
setWorkspaceInfoin interfaceWorkspace- Overrides:
setWorkspaceInfoin classIrisTableModel- Parameters:
workspaceInfo- AnElementcontaining the persisted state.
-
setFinishedCallback
Description copied from interface:ExtendableTableInterfaceset a callback to be called on the swing thread sometime after finishAddColumns- Specified by:
setFinishedCallbackin interfaceExtendableTableInterface- Parameters:
r- Runnable to be called after finishAddColumns
-
popFinishedCallback
Description copied from interface:ExtendableTableInterfaceget the current callback value. set the callback to null- Specified by:
popFinishedCallbackin interfaceExtendableTableInterface- Returns:
- current callback, if any
-
getSortableColumns
- Overrides:
getSortableColumnsin classIrisTableModel
-