protected class XJTable.SortingModel extends AbstractTableModel implements TableModelListener
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | XJTable.SortingModel.ValueHolder | 
| protected class  | XJTable.SortingModel.ValueHolderComparator | 
| Modifier and Type | Field and Description | 
|---|---|
| protected XJTable.SortingModel.ValueHolderComparator | compWrapper | 
| protected TableModel | sourceModel | 
| protected int[] | sourceToTargetThe direct index | 
| protected int[] | targetToSourceThe reverse index. | 
listenerList| Constructor and Description | 
|---|
| SortingModel(TableModel sourceModel) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | buildTargetToSourceIndex()Builds the reverse index based on the new sorting order. | 
| Class<?> | getColumnClass(int columnIndex) | 
| int | getColumnCount() | 
| String | getColumnName(int columnIndex) | 
| int | getRowCount() | 
| Object | getValueAt(int row,
          int column) | 
| protected void | init(TableModel sourceModel) | 
| boolean | isCellEditable(int rowIndex,
              int columnIndex) | 
| void | setValueAt(Object aValue,
          int rowIndex,
          int columnIndex) | 
| void | sort()Sorts the table using the values in the specified column and sorting order. | 
| int | sourceToTarget(int index)Converts an index from the source coordinates to the target ones. | 
| void | tableChanged(TableModelEvent e)This gets events from the source model and forwards them to the UI | 
| int | targetToSource(int index)Converts an index from the target coordinates to the source ones. | 
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerprotected int[] sourceToTarget
protected int[] targetToSource
protected TableModel sourceModel
protected XJTable.SortingModel.ValueHolderComparator compWrapper
public SortingModel(TableModel sourceModel)
protected void init(TableModel sourceModel)
public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenerpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic boolean isCellEditable(int rowIndex,
                              int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic Object getValueAt(int row, int column)
getValueAt in interface TableModelpublic void sort()
public int sourceToTarget(int index)
index - the index in the source coordinates.public int targetToSource(int index)
index - the index in the target coordinates.
 Used to propagate events from the view (e.g. editing) to the source
 data source (table model).protected void buildTargetToSourceIndex()
Copyright © 2024 GATE. All rights reserved.