|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.plaf.basic.core.ListSortUI
public final class ListSortUI
ListSortUI provides support for managing the synchronization between RowSorter, SelectionModel and ListModel if a JXList is sortable.
This implementation is an adaption of JTable.SortManager fit to the needs of a ListUI. In contrast to JTable tradition, the ui delegate has full control about listening to model/selection changes and updating the list accordingly. So it's role is that of a helper to the ui-delgate (vs. as a helper of the JTable). It's still up to the ListUI itself to listen to model/selection and propagate the notification to this class, if a sorter is installed, but still do the usual updates (layout, repaint) itself. On the other hand, listening to the sorter and updating list state accordingly is completely done by this.
| Constructor Summary | |
|---|---|
ListSortUI(JXList list,
javax.swing.RowSorter<? extends javax.swing.ListModel> sorter)
Intanstiates a SortUI on the list which has the given RowSorter. |
|
| Method Summary | |
|---|---|
protected javax.swing.event.RowSorterListener |
createRowSorterListener()
Creates and returns a RowSorterListener. |
void |
dispose()
Disposes any resources used by this SortManager. |
void |
modelChanged(javax.swing.event.ListDataEvent e)
Called after notification from ListModel. |
protected void |
sortedChanged(javax.swing.event.RowSorterEvent e)
Called after notification from RowSorter. |
void |
viewSelectionChanged(javax.swing.event.ListSelectionEvent e)
Called after notification from selectionModel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListSortUI(JXList list,
javax.swing.RowSorter<? extends javax.swing.ListModel> sorter)
list - the list to control, must not be nullsorter - the rowSorter of the list, must not be null
java.lang.NullPointerException - if either the list or the sorter is null
java.lang.IllegalStateException - if the sorter is not the sorter installed
on the list| Method Detail |
|---|
public void dispose()
public void modelChanged(javax.swing.event.ListDataEvent e)
e - the change event from the listModel.public void viewSelectionChanged(javax.swing.event.ListSelectionEvent e)
protected void sortedChanged(javax.swing.event.RowSorterEvent e)
e - RowSorter event of type SORTED.protected javax.swing.event.RowSorterListener createRowSorterListener()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||