Package jadex.commons.gui.jtable
Class SorterFilterTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jadex.commons.gui.jtable.DelegateTableModel
-
- jadex.commons.gui.jtable.AbstractIndexTableModel
-
- jadex.commons.gui.jtable.SorterFilterTableModel
-
- All Implemented Interfaces:
ISorterFilterTableModel
,java.io.Serializable
,java.util.EventListener
,javax.swing.event.TableModelListener
,javax.swing.table.TableModel
public class SorterFilterTableModel extends AbstractIndexTableModel implements ISorterFilterTableModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
doFilter
protected java.util.Vector
filter
static int
PAUSE_DISPLAYING_OFF
protected boolean
pauseDisplaying
protected int
pauseRow
protected int
sortColumn
protected java.util.Vector
sortColumns
protected int
sortDirection
-
Fields inherited from class jadex.commons.gui.jtable.AbstractIndexTableModel
indexList
-
Fields inherited from class jadex.commons.gui.jtable.DelegateTableModel
delegate
-
Fields inherited from interface jadex.commons.gui.jtable.ISorterFilterTableModel
ASCENDING, DESCENDING, NONE
-
-
Constructor Summary
Constructors Constructor Description SorterFilterTableModel(javax.swing.table.TableModel delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMouseListener(javax.swing.JTable table)
java.util.Vector
getFilter()
int
getSortColumn()
int
getSortDirection()
boolean
isDoFilter()
boolean
isDoSort()
boolean
isPausedDisplaying()
void
renewIndex()
void
setDoFilter(boolean doFilter)
void
setFilter(java.util.Vector filter)
Filter the table using the values in the given vector.void
setPauseDisplaying(boolean pauseDisplaying)
void
setSortColumn(int sortColumn)
void
setSortDirection(int sortDirection)
void
tableRowsDeleted(int column, int firstRow, int lastRow)
void
tableRowsInserted(int column, int firstRow, int lastRow)
Filter the model.void
tableRowsUpdated(int column, int firstRow, int lastRow)
-
Methods inherited from class jadex.commons.gui.jtable.AbstractIndexTableModel
getRowCount, getValueAt, mapRow, setValueAt, tableChanged
-
Methods inherited from class jadex.commons.gui.jtable.DelegateTableModel
getColumnClass, getColumnCount, getColumnName, getDelegate, isCellEditable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
PAUSE_DISPLAYING_OFF
public static final int PAUSE_DISPLAYING_OFF
- See Also:
- Constant Field Values
-
filter
protected java.util.Vector filter
-
doFilter
protected boolean doFilter
-
sortColumns
protected java.util.Vector sortColumns
-
sortColumn
protected int sortColumn
-
sortDirection
protected int sortDirection
-
pauseDisplaying
protected boolean pauseDisplaying
-
pauseRow
protected int pauseRow
-
-
Method Detail
-
renewIndex
public void renewIndex()
-
tableRowsDeleted
public void tableRowsDeleted(int column, int firstRow, int lastRow)
- Specified by:
tableRowsDeleted
in classAbstractIndexTableModel
-
tableRowsInserted
public void tableRowsInserted(int column, int firstRow, int lastRow)
Description copied from class:AbstractIndexTableModel
Filter the model. Subclasses should implement this methods to provide the filter logic.- Specified by:
tableRowsInserted
in classAbstractIndexTableModel
-
tableRowsUpdated
public void tableRowsUpdated(int column, int firstRow, int lastRow)
- Specified by:
tableRowsUpdated
in classAbstractIndexTableModel
-
addMouseListener
public void addMouseListener(javax.swing.JTable table)
-
getSortColumn
public int getSortColumn()
- Specified by:
getSortColumn
in interfaceISorterFilterTableModel
-
setSortColumn
public void setSortColumn(int sortColumn)
- Specified by:
setSortColumn
in interfaceISorterFilterTableModel
-
getSortDirection
public int getSortDirection()
- Specified by:
getSortDirection
in interfaceISorterFilterTableModel
-
setSortDirection
public void setSortDirection(int sortDirection)
- Specified by:
setSortDirection
in interfaceISorterFilterTableModel
-
isDoSort
public boolean isDoSort()
-
setFilter
public void setFilter(java.util.Vector filter)
Filter the table using the values in the given vector.- Specified by:
setFilter
in interfaceISorterFilterTableModel
- Parameters:
filter
- A Vector of filter expressions
-
getFilter
public java.util.Vector getFilter()
- Specified by:
getFilter
in interfaceISorterFilterTableModel
-
isDoFilter
public boolean isDoFilter()
- Specified by:
isDoFilter
in interfaceISorterFilterTableModel
-
setDoFilter
public void setDoFilter(boolean doFilter)
- Specified by:
setDoFilter
in interfaceISorterFilterTableModel
-
isPausedDisplaying
public boolean isPausedDisplaying()
-
setPauseDisplaying
public void setPauseDisplaying(boolean pauseDisplaying)
-
-