Package com.illumon.iris.gui.table
Interface ExtendableTableInterface
- All Known Implementing Classes:
DBTableModel
,FilteredTableModel
,GuiTableMap
,InputOverlayTableModel
,SortedTableModel
public interface ExtendableTableInterface
Defines tables that support adding and changing columns
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static class
Results to be handed from beginAddColumns to finishAddColumns. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
asString
(List<ExtendableTableInterface.Entry> columnDefinitions) Convenience method: convert list of entries to useful stringBegin the process of setting extended columns.void
finishAddColumns
(ExtendableTableInterface.PartialResult partialResult) Incorporate the new DBTable and columns into tables and models.get all extended columns and definitionsstatic Collection<String>
makeParameterList
(List<ExtendableTableInterface.Entry> columnDefinitions) Convenience method: convert list of entries into collection of updateView parameters in name=definition formatget the current callback value.void
set a callback to be called on the swing thread sometime after finishAddColumnsboolean
Determine whether this instance supports column change.
-
Method Details
-
supportsColumnChange
boolean supportsColumnChange()Determine whether this instance supports column change. Some subclasses support this in all cases, others only sometimes.- Returns:
- true if it is valid to call addColumns
-
beginAddColumns
ExtendableTableInterface.PartialResult beginAddColumns(List<ExtendableTableInterface.Entry> columns) 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.- Parameters:
columns
- list of column name/definition entries to add- Returns:
- PartialResult containing intermediate results to be passed to finishAddColumns
- Throws:
RuntimeException
- for a variety of errors
-
setFinishedCallback
set a callback to be called on the swing thread sometime after finishAddColumns- Parameters:
r
- Runnable to be called after finishAddColumns
-
popFinishedCallback
Runnable popFinishedCallback()get the current callback value. set the callback to null- Returns:
- current callback, if any
-
finishAddColumns
Incorporate the new DBTable and columns into tables and models. This must not be called on the Swing event thread.- Parameters:
partialResult
- intermediate results from beginAddColumns
-
getExtendedColumns
List<ExtendableTableInterface.Entry> getExtendedColumns()get all extended columns and definitions- Returns:
- list of name/definition pairs.
-
makeParameterList
Convenience method: convert list of entries into collection of updateView parameters in name=definition format -
asString
Convenience method: convert list of entries to useful string
-