Package com.illumon.iris.console.db
Class DBTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.illumon.iris.gui.table.IrisTableModel
com.illumon.iris.console.db.BaseDBTableModel
com.illumon.iris.console.db.DBTableModel
- All Implemented Interfaces:
DBTableFetcher
,DBViewportFetcher
,LayoutHintingModel
,TableFormatProvider
,AutoFilterModel
,ConditionalFormattingModel
,CsvExportable
,ExtendableTableInterface
,FilteredModel
,ConditionalFormattingStrategy.ConditionalFormattingChangeListener
,MultiModelTable
,QuickFilterable
,ReversibleModel
,SortableModel
,ToolTipGeneratingTableModel
,UpdateListener
,Workspace
,Serializable
,TableModel
public class DBTableModel extends BaseDBTableModel implements Workspace, TableModel, ToolTipGeneratingTableModel, MultiModelTable, DBTableFetcher, DBViewportFetcher, CsvExportable, TableFormatProvider, LayoutHintingModel, ExtendableTableInterface, FilteredModel, QuickFilterable, AutoFilterModel, ReversibleModel, SortableModel, ConditionalFormattingModel
Table model for displaying views of layered Deephaven tables.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DBTableModel.TableChangeListener
Interface for listeners that want to be notified about changes to the underlying tables.Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.AutoFilterModel
AutoFilterModel.AutoFilterListener, AutoFilterModel.AutoFilterRequestHandler
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.ReversibleModel
ReversibleModel.ReverseType
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.SortableModel
SortableModel.SortingDirective
Nested classes/interfaces inherited from interface com.illumon.iris.console.db.TableFormatProvider
TableFormatProvider.FormatType
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ToolTipGeneratingTableModel
ToolTipGeneratingTableModel.GeneratedToolTip
-
Field Summary
Fields Modifier and Type Field Description static int
LOG_REMOTE_OPERATOR_APPLY_LENGTH
Indicates how long an output the RemoteOperatorApply toString function can produce.static String
LOG_REMOTE_OPERATOR_APPLY_LENGTH_PROPERTY
Defines the name of the property that controls how long the RemoteOperatorApply toString value is allowed to be.static Collection<String>
PREFETCH_ATTRS
Fields inherited from interface com.illumon.iris.gui.table.QuickFilterable
DEFAULT_MAX_QUICKFILTER_LENGTH
-
Constructor Summary
Constructors Constructor Description DBTableModel(com.fishlib.io.logger.Logger log, String name, Table baselineTable)
Construct a new model.DBTableModel(com.fishlib.io.logger.Logger log, String name, Table baselineTable, Function<DBTableModel,FilterStrategyImpl> filterStrategyFactory)
Construct a new model. -
Method Summary
Modifier and Type Method Description void
addTableChangeListener(DBTableModel.TableChangeListener listener)
Adds a listener for changes to the underlying Table.ExtendableTableInterface.PartialResult
beginAddColumns(List<ExtendableTableInterface.Entry> columnDefinitions)
Begin the process of setting extended columns.void
cancelSorting()
Clear sorting on all columns.void
clearBaselineTable()
Change the baseline table for this model to an empty table with the same schema, and recompute accordingly.long
convertRowIndexToTableIndex(Table table, int row)
Convert an index in Swing space, to Deephaven Table space.void
deleteRollup(String name)
Delete the saved rollup.protected void
doneProcessing()
void
exportToCsv(Container ref, File f, com.fishlib.base.Procedure.Unary<File> openOrCopyFile)
void
filterChanged()
Notify the implementation that the set of underlying filters have changed.void
finishAddColumns(ExtendableTableInterface.PartialResult partialResult)
Incorporate the new DBTable and columns into tables and models.ToolTipGeneratingTableModel.GeneratedToolTip
generateToolTip(int columnIndex, GuiColumn column)
Table
getBaselineTable()
Gets the baseline table.String
getCellFormat(String columnName, int row, TableFormatProvider.FormatType type)
long
getColumnColor(String columnName, int row)
ConditionalFormattingStrategy
getConditionalFormattingStrategy()
Table
getDataTable()
Gets the data table.Table
getDbViewportTable()
Deprecated.Table
getDisplayedTable()
Gets the displayed table.int
getEstimatedSelectedItemCount(JTable jTable)
Get the estimated number of selected rows for this table.List<ExtendableTableInterface.Entry>
getExtendedColumns()
get all extended columns and definitionsFilterStrategyImpl
getFilterStrategy()
Get theFilterStrategyImpl
in use.Icon
getHeaderRendererIcon(int columnIndex, int size)
Get the sort icon for the specified column and size.int
getInitialFetchSize(String column)
Get the number of unique values to initially fetch for the specified column.LayoutHintBuilder
getLayoutHints()
TableModel
getModel()
return the single child model, or null if none<MODEL_TYPE extends TableModel>
MODEL_TYPEgetModel(Class<MODEL_TYPE> modelTypeClass)
return a model of type modelType, or null if noneTableModel
getOriginalModel()
int[]
getOriginalRowIndices(int[] selectedRows)
int[]
getOriginalRowIndices(int[] selectedRows, boolean sorted)
String
getQuickFilter()
Get the current quick filter stringQuickFilterMode
getQuickFilterMode()
Get the current quick filter mode.long
getRawSize()
Gets the raw size of theviewport table
ReversibleModel.ReverseType
getReverseType()
long
getRowColor(int row)
int
getRowCount()
org.jdom2.Element[]
getSavedConditionalFormattingStrategies()
SavedRollup
getSavedRollup()
Gets the info for performing a rollup on this model.List<SavedRollup>
getSavedRollups()
Get list of all saved rollups for this model.org.jdom2.Element[]
getSavedStrategies()
Get all of the saved strategy workspaceElement
sSet<String>
getSortableColumns()
Get the set of sortable columns.SortableModel.SortingDirective
getSortingDirective(int columnIndex)
Get the sorting status of a single column.Table
getTable()
Deprecated.Table
getTableForSelection(int[] selectedRowIndexes, BitSet includedColumnIndexes)
Get a table containing only values as determined by the identified array of selected rows.Table
getTableForSelection(int[] selectedRowIndexes, BitSet includedColumnIndexes, boolean stripPreview)
Get a table containing only values as determined by the identified array of selected rows.Table
getTableForSelection(JTable jTable)
Get a table containing only selected values as determined by the selection model.Table
getTableForSelection(JTable jTable, boolean stripPreview)
Get a table containing only selected values as determined by the selection model.Table
getTableForSelection(JTable jTable, BitSet includedColumnIndexes)
Get a table containing only selected values as determined by the selection model.Table
getTableForSelection(JTable jTable, BitSet includedColumnIndexes, boolean stripPreview)
Get a table containing only selected values as determined by the selection model.TelemetryLogger.TelemetryInfo
getTelemetryInfo()
Table
getUnfilteredDataTable()
Gets the unfiltered data table.Object
getValueAt(int rowIndex, int columnIndex)
Table
getViewportTable()
Gets the viewport table.org.jdom2.Element
getWorkspaceInfo()
Serialize the class into an element to be stored in the workspaceboolean
hasCellFormat(String columnName, TableFormatProvider.FormatType type)
boolean
hasColumnColor(String columnName)
boolean
hasRowColor(String columnName)
boolean
hasShowStatistics()
void
headerClicked(MouseEvent e)
Called when sorting should be changed based on a header click.boolean
isBaselineSubsetOfOtherBaseline(DBTableModel other)
Figure out whether the baseline table columns in this DBTableModel are all present in another DBTableModel's baseline table.boolean
isCellEditable(int rowIndex, int columnIndex)
boolean
isClosed()
boolean
isFilterable(String column)
Check if the specified column is filterable.boolean
isFilteringOn()
Check if the model is currently being filtered.boolean
isRemote()
Indicates if the underlying Table for this model is remote.boolean
isSorting()
determine whether there are any sorting directives - similar to empty()boolean
isStale(int rowIndex, int columnIndex)
Check if the specified cell is stale.void
markColumnColorUnchanged(String columnName)
void
onFormattingChanged()
void
onFormattingChanged(String columnName)
Runnable
popFinishedCallback()
get the current callback value.void
removeConditionalFormattingStrategy(String name)
void
removeStrategy(String name)
Remove the globally saved filter of the specified name.void
removeTableChangeListener(DBTableModel.TableChangeListener listener)
Removes a table change listener.AutoFilterModel.AutoFilterRequestHandler
requestAutoFilterData(String columnName, int maxUniqueValues, AutoFilterModel.AutoFilterListener listener)
Requests auto filter data for a given column name.AutoFilterModel.AutoFilterRequestHandler
requestMoreAutoFilterData(String columnName, AutoFilterModel.AutoFilterListener listener)
Requests more data for the given column.void
reverse(ReversibleModel.ReverseType type)
Set the type of reversal operation to perform.void
saveConditionalFormattingStrategy(String name)
void
saveRollup(com.illumon.iris.treetable.RollupDefinition def, org.jdom2.Element workspaceInfo)
Save the specified rollup to the workspace.void
saveStrategy(String name)
Save the current set of filters to the global set of filters by name.void
setBaselineTable(Table baselineTable)
Change the baseline table for this model, and recompute accordingly.void
setClosed()
Closes the table model and releases all table handles.static void
setColumnTypeEditable(Class columnType)
When rendering a column of columnType; indicate that it is editable to the JTable.void
setFinishedCallback(Runnable finishedCallback)
set a callback to be called on the swing thread sometime after finishAddColumnsvoid
setQuickFilter(String filter, QuickFilterMode mode)
Set the quick filter to apply.void
setSavedRollup(SavedRollup rollup)
Sets the rollup info created by a UI rollup.void
setSortingStatus(int columnIndex, 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
setWorkspaceInfo(org.jdom2.Element workspaceInfo)
Restore the class to the state defined by the data persisted in workspaceInfovoid
showStatistics(JTable table, int columnIndex, GuiColumn column)
boolean
supportsColumnChange()
Determine whether this instance supports column change.static void
updateMaxTableRows()
Update the maximum number of tables rows that can be displayed.DBTableModel
updateTelemetryInfo(TelemetryLogger.TelemetryInfo telemetryInfo)
DBTableModel
updateTelemetryInfo(String tableName, long pqSerial, QueryProcessorConnection qpc)
boolean
wasColumnColorChanged(String columnName)
Methods inherited from class com.illumon.iris.console.db.BaseDBTableModel
columnSet, columnSet, columnSet, columnSet, columnSet, generateThrowableHtmlMessage, getIrisTablePanel, getName, getViewportForTable, removeStatusMessage, setIrisTablePanel, setProcessingMessage, setStatusMessage, setStatusMessageButton, setTabColor, setWarningAndTableSize, showProcessingErrorPopup, showProcessingErrorPopup
Methods inherited from class com.illumon.iris.gui.table.IrisTableModel
dispose, getColumnClass, getColumnCount, getColumnIndex, getColumnName, getColumnSet, getNonViewColumnSet, getTableModelName, processUpdate, registerAsUpdateListener, setColumnSet
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, removeTableModelListener, setValueAt
-
Field Details
-
LOG_REMOTE_OPERATOR_APPLY_LENGTH_PROPERTY
Defines the name of the property that controls how long the RemoteOperatorApply toString value is allowed to be.- See Also:
- Constant Field Values
-
LOG_REMOTE_OPERATOR_APPLY_LENGTH
public static final int LOG_REMOTE_OPERATOR_APPLY_LENGTHIndicates how long an output the RemoteOperatorApply toString function can produce. When set to a negative value, no length limit will be applied, though the QueryOperationPerformanceLog has a length limit of its own. When set to 0, the internal details of the RemoteOperatorApply will be omitted. When set to any positive value, the output will be capped at that length.- ImplNote:
- This should not normally be needed, but in some cases (such as a client with a table with thousands of columns, allowing users to use the 'search' function to apply a filter to all the text columns at once), the RemoteOperatorApply full-detail value might become so long as to impact a client. Therefore, this mechanism is included to allow the full-detail value to be reduced or entirely excluded as needed.
-
PREFETCH_ATTRS
-
-
Constructor Details
-
DBTableModel
public DBTableModel(@NotNull com.fishlib.io.logger.Logger log, @NotNull String name, @NotNull Table baselineTable)Construct a new model.- Parameters:
log
- The logname
- The namebaselineTable
- The baseline table
-
DBTableModel
public DBTableModel(@NotNull com.fishlib.io.logger.Logger log, @NotNull String name, @NotNull Table baselineTable, @NotNull Function<DBTableModel,FilterStrategyImpl> filterStrategyFactory)Construct a new model.- Parameters:
log
- The logname
- The namebaselineTable
- The baseline tablefilterStrategyFactory
- A factory to create the filter strategy
-
-
Method Details
-
updateMaxTableRows
public static void updateMaxTableRows()Update the maximum number of tables rows that can be displayed. Should be called after changing font or look-and-feel. -
setColumnTypeEditable
When rendering a column of columnType; indicate that it is editable to the JTable.- Parameters:
columnType
- the Class to make column's editable for
-
updateTelemetryInfo
-
updateTelemetryInfo
public DBTableModel updateTelemetryInfo(@Nullable String tableName, long pqSerial, @Nullable QueryProcessorConnection qpc) -
getTelemetryInfo
-
isRemote
public boolean isRemote()Indicates if the underlying Table for this model is remote.- Returns:
- true if the Table is remote, false otherwise
-
addTableChangeListener
Adds a listener for changes to the underlying Table. Note that this will call listener immediately upon being added.- Parameters:
listener
- the listener to add
-
removeTableChangeListener
Removes a table change listener.- Parameters:
listener
- the listener to remove
-
getBaselineTable
Gets the baseline table. This is the unmodified table prior to any apply operations.- Returns:
- the baseline table.
-
getUnfilteredDataTable
Gets the unfiltered data table. This is the table for getting data prior to any filtering.- Returns:
- the unfiltered data table
-
getDataTable
Gets the data table. This is the table for getting data after any filtering.- Returns:
- the data table
-
getDisplayedTable
Gets the displayed table. This is the table that will be displayed.- Returns:
- the displayed table
-
getViewportTable
Gets the viewport table. This is the table for viewport.- Returns:
- the viewport table.
-
setClosed
public void setClosed()Closes the table model and releases all table handles. -
isClosed
public boolean isClosed() -
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(@NotNull 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.
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableModel
-
getRawSize
public long getRawSize()Gets the raw size of theviewport table
- Returns:
- the raw size
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
getValueAt
- Specified by:
getValueAt
in interfaceTableModel
-
convertRowIndexToTableIndex
Convert an index in Swing space, to Deephaven Table space. While the indices passed to the DBTableModel may appear to be flat the underlying table may not be.- Parameters:
row
- The row in Swing-model space.- Returns:
- the equivalent index into the Deephaven viewport table
-
isStale
public boolean isStale(int rowIndex, int columnIndex)Check if the specified cell is stale. Note that the indices are in SWING model space, and will be automatically converted to Deephaven table space.- Overrides:
isStale
in classIrisTableModel
- Parameters:
rowIndex
- the row indexcolumnIndex
- the column index- Returns:
- true if the cell is stale.
-
generateToolTip
public ToolTipGeneratingTableModel.GeneratedToolTip generateToolTip(int columnIndex, @NotNull GuiColumn column)- Specified by:
generateToolTip
in interfaceToolTipGeneratingTableModel
-
hasShowStatistics
public boolean hasShowStatistics()- Specified by:
hasShowStatistics
in interfaceToolTipGeneratingTableModel
-
showStatistics
- Specified by:
showStatistics
in interfaceToolTipGeneratingTableModel
-
setToolTipDialog
public void setToolTipDialog(int col, @NotNull GuiColumn column, @NotNull JDialog dialog, @NotNull JLabel label)- Specified by:
setToolTipDialog
in interfaceToolTipGeneratingTableModel
-
getModel
public <MODEL_TYPE extends TableModel> MODEL_TYPE getModel(@NotNull Class<MODEL_TYPE> modelTypeClass)Description copied from interface:MultiModelTable
return a model of type modelType, or null if none- Specified by:
getModel
in interfaceMultiModelTable
-
getModel
Description copied from interface:MultiModelTable
return the single child model, or null if none- Specified by:
getModel
in interfaceMultiModelTable
-
getOriginalRowIndices
public int[] getOriginalRowIndices(@NotNull int[] selectedRows)- Specified by:
getOriginalRowIndices
in interfaceMultiModelTable
-
getOriginalRowIndices
public int[] getOriginalRowIndices(@NotNull int[] selectedRows, boolean sorted)- Specified by:
getOriginalRowIndices
in interfaceMultiModelTable
-
getOriginalModel
- Specified by:
getOriginalModel
in interfaceMultiModelTable
-
getTable
Deprecated.- Specified by:
getTable
in interfaceDBTableFetcher
-
getDbViewportTable
Deprecated.- Specified by:
getDbViewportTable
in interfaceDBViewportFetcher
-
exportToCsv
public void exportToCsv(Container ref, File f, com.fishlib.base.Procedure.Unary<File> openOrCopyFile) throws IOException- Specified by:
exportToCsv
in interfaceCsvExportable
- Throws:
IOException
-
getTableForSelection
Get a table containing only selected values as determined by the selection model.- Parameters:
jTable
- The table to find selected items in- Returns:
- A table containing only the rows selected by the model.
-
getTableForSelection
Get a table containing only selected values as determined by the selection model.- Parameters:
jTable
- The table to find selected items instripPreview
- Remove preview application, so that the raw data from the table is returned (e.g., double[] not the preview of the double[]).- Returns:
- A table containing only the rows selected by the model.
-
getTableForSelection
Get a table containing only selected values as determined by the selection model. The resultant table will only contain the columns defined bycolumns
- Parameters:
jTable
- The table to find selected items inincludedColumnIndexes
- The columns to include in the new table.- Returns:
- A table containing only the rows selected by the model.
-
getTableForSelection
public Table getTableForSelection(@NotNull int[] selectedRowIndexes, @NotNull BitSet includedColumnIndexes)Get a table containing only values as determined by the identified array of selected rows. The resultant table will only contain the columns defined bycolumns
- Parameters:
selectedRowIndexes
- The properly indexed rows from the original to include in the new tableincludedColumnIndexes
- The columns to include in the new table.- Returns:
- A table containing only the rows selected by the model.
-
getTableForSelection
public Table getTableForSelection(@NotNull JTable jTable, @NotNull BitSet includedColumnIndexes, boolean stripPreview)Get a table containing only selected values as determined by the selection model. The resultant table will only contain the columns defined bycolumns
- Parameters:
jTable
- The table to find selected items inincludedColumnIndexes
- The columns to include in the new table.stripPreview
- Remove preview application, so that the raw data from the table is returned (e.g., double[] not the preview of the double[]).- Returns:
- A table containing only the rows selected by the model.
-
getTableForSelection
public Table getTableForSelection(@NotNull int[] selectedRowIndexes, @NotNull BitSet includedColumnIndexes, boolean stripPreview)Get a table containing only values as determined by the identified array of selected rows. The resultant table will only contain the columns defined bycolumns
- Parameters:
selectedRowIndexes
- The properly indexed rows from the original to include in the new tableincludedColumnIndexes
- The columns to include in the new table.stripPreview
- Remove preview application, so that the raw data from the table is returned (e.g., double[] not the preview of the double[]).- Returns:
- A table containing only the rows selected by the model.
-
getEstimatedSelectedItemCount
Get the estimated number of selected rows for this table. -
getColumnColor
- Specified by:
getColumnColor
in interfaceTableFormatProvider
-
getRowColor
public long getRowColor(int row)- Specified by:
getRowColor
in interfaceTableFormatProvider
-
getCellFormat
public String getCellFormat(@NotNull String columnName, int row, @NotNull TableFormatProvider.FormatType type)- Specified by:
getCellFormat
in interfaceTableFormatProvider
-
hasColumnColor
- Specified by:
hasColumnColor
in interfaceTableFormatProvider
-
hasRowColor
- Specified by:
hasRowColor
in interfaceTableFormatProvider
-
hasCellFormat
public boolean hasCellFormat(@NotNull String columnName, @NotNull TableFormatProvider.FormatType type)- Specified by:
hasCellFormat
in interfaceTableFormatProvider
-
wasColumnColorChanged
- Specified by:
wasColumnColorChanged
in interfaceTableFormatProvider
-
markColumnColorUnchanged
- Specified by:
markColumnColorUnchanged
in interfaceTableFormatProvider
-
getLayoutHints
- Specified by:
getLayoutHints
in interfaceLayoutHintingModel
- Returns:
- A LayoutHintBuilder defining the layout hints for this model, or null if none were present.
-
setSavedRollup
Sets the rollup info created by a UI rollup.- Parameters:
rollup
- the info for rolling up this model
-
getSavedRollup
Gets the info for performing a rollup on this model. This will be null if the model has never been rollup up.- Returns:
- the rollup model, null if there is none
-
isBaselineSubsetOfOtherBaseline
Figure out whether the baseline table columns in this DBTableModel are all present in another DBTableModel's baseline table.- Parameters:
other
- The other DBTableModel- Returns:
- true if all columns in this model's baseline table are present in the other model's data table with the same data type
-
supportsColumnChange
public boolean supportsColumnChange()Description copied from interface:ExtendableTableInterface
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(@NotNull 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
-
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:
finishedCallback
- 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
-
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.
-
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 interfaceAutoFilterModel
- 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:
name
- 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 interfaceAutoFilterModel
- Specified by:
isFilterable
in interfaceFilteredModel
- Parameters:
column
- the column name.- Returns:
- true if the column is filterable.
-
setQuickFilter
Description copied from interface:QuickFilterable
Set the quick filter to apply.- Specified by:
setQuickFilter
in interfaceQuickFilterable
- Parameters:
filter
- the filter textmode
- theQuickFilterMode
to apply with
-
getQuickFilter
Description copied from interface:QuickFilterable
Get the current quick filter string- Specified by:
getQuickFilter
in interfaceQuickFilterable
- Returns:
- the current filter
-
getQuickFilterMode
Description copied from interface:QuickFilterable
Get the current quick filter mode.- Specified by:
getQuickFilterMode
in interfaceQuickFilterable
- Returns:
- the quickfilter mode
-
requestAutoFilterData
public AutoFilterModel.AutoFilterRequestHandler requestAutoFilterData(@NotNull String columnName, int maxUniqueValues, @NotNull AutoFilterModel.AutoFilterListener listener)Description copied from interface:AutoFilterModel
Requests auto filter data for a given column name.- Specified by:
requestAutoFilterData
in interfaceAutoFilterModel
- Parameters:
columnName
- the name of the columnmaxUniqueValues
- the maximum number of unique values to returnlistener
- a listener for the data- Returns:
- a handler for the request
-
requestMoreAutoFilterData
public AutoFilterModel.AutoFilterRequestHandler requestMoreAutoFilterData(@NotNull String columnName, @NotNull AutoFilterModel.AutoFilterListener listener)Description copied from interface:AutoFilterModel
Requests more data for the given column.- Specified by:
requestMoreAutoFilterData
in interfaceAutoFilterModel
- Parameters:
columnName
- the name of the columnlistener
- a listener for the data- Returns:
- a handler for the request
-
getInitialFetchSize
Description copied from interface:AutoFilterModel
Get the number of unique values to initially fetch for the specified column.- Specified by:
getInitialFetchSize
in interfaceAutoFilterModel
- Parameters:
column
- The column to get the fetch size for- Returns:
- The number of unique values to fetch
-
reverse
Description copied from interface:ReversibleModel
Set the type of reversal operation to perform.
ReversibleModel.ReverseType.None
- No reversal is performedReversibleModel.ReverseType.PreReverse
- Reverse the table before performing sortsReversibleModel.ReverseType.PostReverse
- Reverse the table after performing sorts
- Specified by:
reverse
in interfaceReversibleModel
-
getReverseType
- Specified by:
getReverseType
in interfaceReversibleModel
- Returns:
- The current table reversal mode.
-
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:
columnIndex
- 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 columnIndex, 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 classIrisTableModel
- Returns:
- the set of sortable columns
-
saveConditionalFormattingStrategy
- Specified by:
saveConditionalFormattingStrategy
in interfaceConditionalFormattingModel
-
getSavedConditionalFormattingStrategies
public org.jdom2.Element[] getSavedConditionalFormattingStrategies()- Specified by:
getSavedConditionalFormattingStrategies
in interfaceConditionalFormattingModel
-
removeConditionalFormattingStrategy
- Specified by:
removeConditionalFormattingStrategy
in interfaceConditionalFormattingModel
-
getConditionalFormattingStrategy
- Specified by:
getConditionalFormattingStrategy
in interfaceConditionalFormattingModel
-
onFormattingChanged
public void onFormattingChanged()- Specified by:
onFormattingChanged
in interfaceConditionalFormattingStrategy.ConditionalFormattingChangeListener
-
onFormattingChanged
- Specified by:
onFormattingChanged
in interfaceConditionalFormattingStrategy.ConditionalFormattingChangeListener
-
setBaselineTable
Change the baseline table for this model, and recompute accordingly. It is expected that the new baseline table has the same structure as the original.- Parameters:
baselineTable
- The new baseline table
-
clearBaselineTable
public void clearBaselineTable()Change the baseline table for this model to an empty table with the same schema, and recompute accordingly. -
doneProcessing
protected void doneProcessing()- Overrides:
doneProcessing
in classBaseDBTableModel
-
saveRollup
public void saveRollup(com.illumon.iris.treetable.RollupDefinition def, org.jdom2.Element workspaceInfo)Save the specified rollup to the workspace.- Parameters:
def
- the rollup to saveworkspaceInfo
-
-
deleteRollup
Delete the saved rollup.- Parameters:
name
- the workspace to delete.
-
getSavedRollups
Get list of all saved rollups for this model.- Returns:
- an list of saved rollups
-