|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.event.MouseAdapter biz.chitec.quarterback.swing.MapListTableSorter
Knows how to sort tables with MapListTableModel behind using a sorting constraint.
Nested Class Summary | |
protected class |
MapListTableSorter.ComponentBasedReconnector
Helper class for cases where multiple tables link to the same model. |
private class |
MapListTableSorter.SortShowingTableHeaderRenderer
|
Field Summary | |
private static javax.swing.Icon |
ASCENDING_ICON
|
private static javax.swing.Icon |
DESCENDING_ICON
|
protected javax.swing.JTable |
jt
|
protected MapComparator |
mycomparator
|
protected boolean |
primaryascending
|
protected int |
primarycolumn
|
protected java.util.List |
sortingconstraints
|
protected javax.swing.table.TableCellRenderer |
tableheaderrenderer
|
protected javax.swing.table.TableColumnModel |
tcm
|
protected MapListTableModel |
tm
|
Constructor Summary | |
protected |
MapListTableSorter()
|
protected |
MapListTableSorter(javax.swing.JTable jtx)
|
protected |
MapListTableSorter(javax.swing.JTable jtx,
java.lang.Object cx)
|
protected |
MapListTableSorter(MapComparator mcx)
|
protected |
MapListTableSorter(MapComparator mcx,
javax.swing.JTable jtx)
|
protected |
MapListTableSorter(MapComparator mcx,
javax.swing.JTable jtx,
java.lang.Object cx)
|
Method Summary | |
protected void |
activateSortingConstraints()
|
static void |
addTo(javax.swing.JTable jt)
|
static void |
addTo(javax.swing.JTable jt,
java.lang.Object cx)
|
static void |
addTo(MapComparator mcx,
javax.swing.JTable jt)
|
static void |
addTo(MapComparator mcx,
javax.swing.JTable jt,
java.lang.Object cx)
|
void |
columnAdded(javax.swing.event.TableColumnModelEvent e)
From TableColumnModelListener. |
void |
columnMarginChanged(javax.swing.event.ChangeEvent e)
From TableColumnModelListener. |
void |
columnMoved(javax.swing.event.TableColumnModelEvent e)
From TableColumnModelListener. |
void |
columnRemoved(javax.swing.event.TableColumnModelEvent e)
From TableColumnModelListener. |
void |
columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
From TableColumnModelListener. |
protected void |
doSort()
|
protected int |
getColumnIndex(java.lang.String key)
|
protected int |
getColumnIndexBySortReplace(java.lang.String sortkey)
|
protected java.lang.String |
getColumnKey(int column)
|
protected java.lang.String |
getSortReplaceKey(int column)
|
protected void |
initPrimarySortingConstraint()
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
From PropertyChangeListener to the JTable. |
private void |
rebindToColumnModel()
Rebinds the adjustor to the table's column model. |
protected void |
rebindToModel()
Rebinds the adjustor to the table's model. |
private void |
setAllTableHeaderRenderers()
|
void |
setMapComparator(MapComparator mcx)
|
void |
setSortingConstraints(java.lang.Object constraints)
|
void |
setTable(javax.swing.JTable jtx)
|
private java.util.Map |
sortingConstraintStringToMap(java.lang.String s)
|
void |
tableChanged(javax.swing.event.TableModelEvent e)
From TableModelListener. |
Methods inherited from class java.awt.event.MouseAdapter |
mouseEntered, mouseExited, mousePressed, mouseReleased |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final javax.swing.Icon ASCENDING_ICON
private static final javax.swing.Icon DESCENDING_ICON
protected javax.swing.JTable jt
protected MapListTableModel tm
protected javax.swing.table.TableColumnModel tcm
protected MapComparator mycomparator
protected java.util.List sortingconstraints
protected int primarycolumn
protected boolean primaryascending
protected javax.swing.table.TableCellRenderer tableheaderrenderer
Constructor Detail |
protected MapListTableSorter(MapComparator mcx)
protected MapListTableSorter()
protected MapListTableSorter(javax.swing.JTable jtx)
protected MapListTableSorter(MapComparator mcx, javax.swing.JTable jtx)
protected MapListTableSorter(javax.swing.JTable jtx, java.lang.Object cx)
protected MapListTableSorter(MapComparator mcx, javax.swing.JTable jtx, java.lang.Object cx)
Method Detail |
public void setMapComparator(MapComparator mcx)
public void setTable(javax.swing.JTable jtx)
public void setSortingConstraints(java.lang.Object constraints)
private java.util.Map sortingConstraintStringToMap(java.lang.String s)
protected java.lang.String getColumnKey(int column)
protected java.lang.String getSortReplaceKey(int column)
protected int getColumnIndex(java.lang.String key)
protected int getColumnIndexBySortReplace(java.lang.String sortkey)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
protected void initPrimarySortingConstraint()
protected void activateSortingConstraints()
protected void doSort()
protected void rebindToModel()
private void setAllTableHeaderRenderers()
private void rebindToColumnModel()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
public void columnAdded(javax.swing.event.TableColumnModelEvent e)
columnAdded
in interface javax.swing.event.TableColumnModelListener
public void columnRemoved(javax.swing.event.TableColumnModelEvent e)
columnRemoved
in interface javax.swing.event.TableColumnModelListener
public void columnMoved(javax.swing.event.TableColumnModelEvent e)
columnMoved
in interface javax.swing.event.TableColumnModelListener
public void columnMarginChanged(javax.swing.event.ChangeEvent e)
columnMarginChanged
in interface javax.swing.event.TableColumnModelListener
public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
columnSelectionChanged
in interface javax.swing.event.TableColumnModelListener
public static void addTo(MapComparator mcx, javax.swing.JTable jt)
public static void addTo(MapComparator mcx, javax.swing.JTable jt, java.lang.Object cx)
public static void addTo(javax.swing.JTable jt, java.lang.Object cx)
public static void addTo(javax.swing.JTable jt)
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |