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 classstatic classResults to be handed from beginAddColumns to finishAddColumns. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringasString(List<ExtendableTableInterface.Entry> columnDefinitions) Convenience method: convert list of entries to useful stringBegin the process of setting extended columns.voidfinishAddColumns(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.voidset a callback to be called on the swing thread sometime after finishAddColumnsbooleanDetermine 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
-