public class JXTableSupport<E>
extends java.lang.Object
JXTableSupport integrates a JXTable with Glazed Lists by
DefaultEventTableModel as table modelDefaultEventSelectionModel as table selection modelTableComparatorChooser as sorting integration approachWarning: This class must be
mutated from the Swing Event Dispatch Thread. Failure to do so will result in
an IllegalStateException thrown from any one of:
| Modifier and Type | Method and Description |
|---|---|
JXTable |
getTable() |
TableComparatorChooser<E> |
getTableComparatorChooser() |
TableFormat<? super E> |
getTableFormat() |
AdvancedTableModel<E> |
getTableModel() |
AdvancedListSelectionModel<E> |
getTableSelectionModel() |
static <E> JXTableSupport<E> |
install(JXTable table,
EventList<E> eventList,
TableFormat<? super E> tableFormat,
SortedList<E> sortedList,
java.lang.Object sortingStrategy)
Installs the Glazed Lists integration on the given
table. |
boolean |
isInstalled() |
void |
uninstall()
Uninstalls the GlazedLists integration and restores the state of JXTable as it was before
the installation.
|
public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, java.lang.Object sortingStrategy)
table.
First, the current state of the table is determined to be able to restore this state when the integration is uninstalled again. Then this method installs
DefaultEventTableModel as table modelDefaultEventSelectionModel as table selection modelTableComparatorChooser as sorting integration approachE - element type of EventListtable - the JXTable to integrate witheventList - the EventList acting as data source for the table model, must be *at least* as high as the sortedList within the list pipeline.
It's possible to layer further transforms *above* the SortedList and pass one of those in as the data sourcetableFormat - the TableFormat to usesortedList - the SortedList to use with the TableComparatorChoosersortingStrategy - the SortingStrategy to use with the
TableComparatorChooserjava.lang.IllegalStateException - if this method is called from any Thread
other than the Swing Event Dispatch ThreadTableComparatorChooser.install(javax.swing.JTable, SortedList, Object, TableFormat)public JXTable getTable()
JXTable or null if JXTableSupport has already been uninstalledpublic AdvancedListSelectionModel<E> getTableSelectionModel()
AdvancedListSelectionModel or null if already uninstalledpublic AdvancedTableModel<E> getTableModel()
AdvancedTableModel or null if already uninstalledpublic TableFormat<? super E> getTableFormat()
TableFormat or null if already uninstalledpublic TableComparatorChooser<E> getTableComparatorChooser()
TableComparatorChooser or null if already uninstalledpublic void uninstall()
java.lang.IllegalStateException - if this method is called from any Thread
other than the Swing Event Dispatch Threadpublic boolean isInstalled()
JXTableSupport instance is currently
installed and altering the behaviour of the JXTable; false if
it has been uninstall()ed.Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019