|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| TableModelFilter.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* EJTools, the Enterprise Java Tools
|
|
| 3 |
*
|
|
| 4 |
* Distributable under LGPL license.
|
|
| 5 |
* See terms of license at www.gnu.org.
|
|
| 6 |
*/
|
|
| 7 |
package org.ejtools.swing.table;
|
|
| 8 |
|
|
| 9 |
import javax.swing.event.TableModelEvent;
|
|
| 10 |
import javax.swing.table.TableModel;
|
|
| 11 |
|
|
| 12 |
/**
|
|
| 13 |
* @author Laurent Etiemble
|
|
| 14 |
* @version $Revision: 1.7 $
|
|
| 15 |
*/
|
|
| 16 |
public abstract class TableModelFilter extends TableModelIndexed |
|
| 17 |
{
|
|
| 18 |
/** Description of the Field */
|
|
| 19 |
protected int column = -1; |
|
| 20 |
/** Description of the Field */
|
|
| 21 |
protected Object[] values;
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
/**
|
|
| 25 |
* Constructor for TableModelFilter.
|
|
| 26 |
*
|
|
| 27 |
* @param model
|
|
| 28 |
*/
|
|
| 29 | 0 |
public TableModelFilter(TableModel model)
|
| 30 |
{
|
|
| 31 | 0 |
super(model);
|
| 32 |
} |
|
| 33 |
|
|
| 34 |
|
|
| 35 |
/**
|
|
| 36 |
* Description of the Method
|
|
| 37 |
*
|
|
| 38 |
* @param column Description of the Parameter
|
|
| 39 |
* @param value Description of the Parameter
|
|
| 40 |
*/
|
|
| 41 | 0 |
public void filter(int column, Object value) |
| 42 |
{
|
|
| 43 | 0 |
this.filter(column, new Object[]{value}); |
| 44 |
} |
|
| 45 |
|
|
| 46 |
|
|
| 47 |
/** Description of the Method */
|
|
| 48 |
public abstract void filter(); |
|
| 49 |
|
|
| 50 |
|
|
| 51 |
/**
|
|
| 52 |
* Description of the Method
|
|
| 53 |
*
|
|
| 54 |
* @param column Description of the Parameter
|
|
| 55 |
* @param values Description of the Parameter
|
|
| 56 |
*/
|
|
| 57 | 0 |
public void filter(int column, Object[] values) |
| 58 |
{
|
|
| 59 | 0 |
this.column = column;
|
| 60 | 0 |
this.values = values;
|
| 61 | 0 |
this.filter();
|
| 62 | 0 |
super.tableChanged(new TableModelEvent(this)); |
| 63 |
} |
|
| 64 |
|
|
| 65 |
|
|
| 66 |
/**
|
|
| 67 |
* Gets the column attribute of the TableModelFilter object
|
|
| 68 |
*
|
|
| 69 |
* @return The column value
|
|
| 70 |
*/
|
|
| 71 | 0 |
public int getColumn() |
| 72 |
{
|
|
| 73 | 0 |
return column;
|
| 74 |
} |
|
| 75 |
|
|
| 76 |
|
|
| 77 |
/**
|
|
| 78 |
* Gets the values attribute of the TableModelFilter object
|
|
| 79 |
*
|
|
| 80 |
* @return The values value
|
|
| 81 |
*/
|
|
| 82 | 0 |
public Object[] getValues()
|
| 83 |
{
|
|
| 84 | 0 |
return values;
|
| 85 |
} |
|
| 86 |
} |
|
| 87 |
|
|
||||||||||