Class InputOverlayTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.illumon.iris.gui.table.IrisTableModel
com.illumon.iris.gui.table.GuiTableMap
com.illumon.iris.console.utils.input.InputOverlayTableModel
- All Implemented Interfaces:
DBTableFetcher
,DBViewportFetcher
,InputOverlayLayer
,ExtendableTableInterface
,FilteredModel
,MultiModelTable
,SortableModel
,ToolTipGeneratingTableModel
,UpdateListener
,Workspace
,Serializable
,EventListener
,TableModelListener
,TableModel
public class InputOverlayTableModel extends GuiTableMap implements TableModelListener, InputOverlayLayer, DBTableFetcher, DBViewportFetcher, ToolTipGeneratingTableModel, SortableModel, FilteredModel
This is the table model for the spreadsheet like input table editor widget
LiveInputTableEditor
.- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ExtendableTableInterface
ExtendableTableInterface.Entry, ExtendableTableInterface.PartialResult
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.SortableModel
SortableModel.SortingDirective
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ToolTipGeneratingTableModel
ToolTipGeneratingTableModel.GeneratedToolTip
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InputOverlayTableModel(InputTableEditorPanel panel, IrisTableModel model, Table table, MutableInputTable inputTable, InputTableSelectionHandler handler, boolean enabledAddRow, boolean keysEditable, com.fishlib.io.logger.Logger log, InputTableStatusListener statusListener)
-
Method Summary
Modifier and Type Method Description void
cancelSorting()
Clear sorting on all columns.void
clear(boolean isUndo)
void
filterChanged()
Notify the implementation that the set of underlying filters have changed.ToolTipGeneratingTableModel.GeneratedToolTip
generateToolTip(int col, GuiColumn column)
Class<?>
getColumnClass(int column)
String
getColumnName(int column)
Table
getDbViewportTable()
FilterStrategyImpl
getFilterStrategy()
Get theFilterStrategyImpl
in use.Icon
getHeaderRendererIcon(int modelColumn, int size)
Get the sort icon for the specified column and size.InputLayerObject
getInputLayerObjectAtInputLayerOnly(int row, int col)
int
getMappedRowIndex(int index)
int
getOriginalRowIndex(int index)
int[]
getOriginalRowIndices(int[] index, boolean sorted)
int
getRowCount()
org.jdom2.Element[]
getSavedStrategies()
Get all of the saved strategy workspaceElement
sSet<String>
getSortableColumns()
Get the set of sortable columns.SortableModel.SortingDirective
getSortingDirective(int column)
Get the sorting status of a single column.Table
getTable()
Object
getValueAt(int rowIndex, int columnIndex)
Object
getValueAtInputLayerOnly(int row, int col)
boolean
hasShowStatistics()
void
headerClicked(MouseEvent e)
Called when sorting should be changed based on a header click.boolean
isCellEditable(int rowIndex, int columnIndex)
boolean
isFilterable(String column)
Check if the specified column is filterable.boolean
isFilteringOn()
Check if the model is currently being filtered.boolean
isSorting()
determine whether there are any sorting directives - similar to empty()boolean
isStale(int row, int col)
void
removeStrategy(String name)
Remove the globally saved filter of the specified name.void
saveChanges()
void
saveStrategy(String result)
Save the current set of filters to the global set of filters by name.void
setSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting)
Set the sorting status of a single column.void
setToolTipDialog(int col, GuiColumn column, JDialog dialog, JLabel label)
void
setValueAt(Object value, int rowIndex, int columnIndex)
void
showStatistics(JTable table, int col, GuiColumn column)
void
tableChanged(TableModelEvent e)
Methods inherited from class com.illumon.iris.gui.table.GuiTableMap
beginAddColumns, finishAddColumns, getColumnCount, getExtendedColumns, getModel, getModel, getOriginalModel, getOriginalRowIndices, getWorkspaceInfo, popFinishedCallback, setColumnSet, setFinishedCallback, setWorkspaceInfo, supportsColumnChange
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.console.utils.input.InputOverlayLayer
getInputLayerObjectAtInputLayerOnly, getValueAtInputLayerOnly
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnCount, removeTableModelListener
-
Constructor Details
-
InputOverlayTableModel
public InputOverlayTableModel(InputTableEditorPanel panel, IrisTableModel model, Table table, MutableInputTable inputTable, InputTableSelectionHandler handler, boolean enabledAddRow, boolean keysEditable, com.fishlib.io.logger.Logger log, InputTableStatusListener statusListener)
-
-
Method Details
-
getValueAtInputLayerOnly
- Specified by:
getValueAtInputLayerOnly
in interfaceInputOverlayLayer
-
getInputLayerObjectAtInputLayerOnly
- Specified by:
getInputLayerObjectAtInputLayerOnly
in interfaceInputOverlayLayer
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classGuiTableMap
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classGuiTableMap
-
saveChanges
public void saveChanges()- Specified by:
saveChanges
in interfaceInputOverlayLayer
-
clear
public void clear(boolean isUndo)- Specified by:
clear
in interfaceInputOverlayLayer
-
getMappedRowIndex
public int getMappedRowIndex(int index)- Specified by:
getMappedRowIndex
in classGuiTableMap
-
isStale
public boolean isStale(int row, int col)- Overrides:
isStale
in classGuiTableMap
-
getValueAt
- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classGuiTableMap
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableModel
- Overrides:
getRowCount
in classGuiTableMap
-
tableChanged
- Specified by:
tableChanged
in interfaceTableModelListener
-
getOriginalRowIndex
public int getOriginalRowIndex(int index)- Overrides:
getOriginalRowIndex
in classGuiTableMap
-
getTable
- Specified by:
getTable
in interfaceDBTableFetcher
-
getDbViewportTable
- Specified by:
getDbViewportTable
in interfaceDBViewportFetcher
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classGuiTableMap
-
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classGuiTableMap
-
getOriginalRowIndices
public int[] getOriginalRowIndices(int[] index, boolean sorted)- Specified by:
getOriginalRowIndices
in interfaceMultiModelTable
- Overrides:
getOriginalRowIndices
in classGuiTableMap
-
generateToolTip
- Specified by:
generateToolTip
in interfaceToolTipGeneratingTableModel
-
hasShowStatistics
public boolean hasShowStatistics()- Specified by:
hasShowStatistics
in interfaceToolTipGeneratingTableModel
-
showStatistics
- Specified by:
showStatistics
in interfaceToolTipGeneratingTableModel
-
setToolTipDialog
- Specified by:
setToolTipDialog
in interfaceToolTipGeneratingTableModel
-
filterChanged
public void filterChanged()Description copied from interface:FilteredModel
Notify the implementation that the set of underlying filters have changed.- Specified by:
filterChanged
in interfaceFilteredModel
-
getFilterStrategy
Description copied from interface:FilteredModel
Get theFilterStrategyImpl
in use.- Specified by:
getFilterStrategy
in interfaceFilteredModel
- Returns:
- the FilterStrategy
-
saveStrategy
Description copied from interface:FilteredModel
Save the current set of filters to the global set of filters by name.- Specified by:
saveStrategy
in interfaceFilteredModel
- Parameters:
result
- the name of the filter
-
getSavedStrategies
@NotNull public org.jdom2.Element[] getSavedStrategies()Description copied from interface:FilteredModel
Get all of the saved strategy workspaceElement
s- Specified by:
getSavedStrategies
in interfaceFilteredModel
- Returns:
- an array of saved filter strategy elements.
-
removeStrategy
Description copied from interface:FilteredModel
Remove the globally saved filter of the specified name.- Specified by:
removeStrategy
in interfaceFilteredModel
- Parameters:
name
- the name of the filter to remove
-
isFilteringOn
public boolean isFilteringOn()Description copied from interface:FilteredModel
Check if the model is currently being filtered.- Specified by:
isFilteringOn
in interfaceFilteredModel
- Returns:
- true if filters are currently applied
-
isFilterable
Description copied from interface:FilteredModel
Check if the specified column is filterable.- Specified by:
isFilterable
in interfaceFilteredModel
- Parameters:
column
- the column name.- Returns:
- true if the column is filterable.
-
headerClicked
Description copied from interface:SortableModel
Called when sorting should be changed based on a header click.- Specified by:
headerClicked
in interfaceSortableModel
- Parameters:
e
- the drivingMouseEvent
-
getHeaderRendererIcon
Description copied from interface:SortableModel
Get the sort icon for the specified column and size. May return null, for no icon.- Specified by:
getHeaderRendererIcon
in interfaceSortableModel
- Parameters:
modelColumn
- the columnsize
- the icon size- Returns:
- an icon to render for sorting.
-
cancelSorting
public void cancelSorting()Description copied from interface:SortableModel
Clear sorting on all columns.- Specified by:
cancelSorting
in interfaceSortableModel
-
setSortingStatus
public void setSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting)Description copied from interface:SortableModel
Set the sorting status of a single column. Adds to existing sort definition.- Specified by:
setSortingStatus
in interfaceSortableModel
-
getSortingDirective
Description copied from interface:SortableModel
Get the sorting status of a single column.- Specified by:
getSortingDirective
in interfaceSortableModel
-
isSorting
public boolean isSorting()Description copied from interface:SortableModel
determine whether there are any sorting directives - similar to empty()- Specified by:
isSorting
in interfaceSortableModel
-
getSortableColumns
Description copied from interface:SortableModel
Get the set of sortable columns.- Specified by:
getSortableColumns
in interfaceSortableModel
- Overrides:
getSortableColumns
in classGuiTableMap
- Returns:
- the set of sortable columns
-