Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.gui.metaaudit
Class Filter  view Filter download Filter.java

java.lang.Object
  extended byorg.greenstone.gatherer.gui.metaaudit.Filter

public class Filter
extends java.lang.Object

This class essentially manages the autofilters applied to the metaaudit table.

Version:
2.3

Field Summary
private  Autofilter[] filters
          An array of autofilters.
private  java.util.Vector listeners
          The registered TableModelFilterListeners.
 
Constructor Summary
Filter(int columns)
          Constructor.
 
Method Summary
 void addTableModelFilterListener(TableModelFilterListener listener)
          Add a TableModelFilterListener to the TableModelFilter.
 void clearFilter(int column)
          Remove a filter from a column.
 boolean filter(javax.swing.table.TableModel model, int row)
          Determine if a certain row should be shown in the table by checking it against all the current filters.
 void fireFilterChanged()
          Called whenever the filters assigned changes significantly, thus prompting a reload of the table model data.
 Autofilter getFilter(int column)
          Retrieve the autofilter associated with a certain column.
 boolean isFiltered(int column)
          Determine if a certain column is filtered.
 void removeTableModelFilterListener(TableModelFilterListener listener)
          Remove a TableModelFilterListener from the TableModelFilter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filters

private Autofilter[] filters
An array of autofilters.


listeners

private java.util.Vector listeners
The registered TableModelFilterListeners.

Constructor Detail

Filter

public Filter(int columns)
Constructor.

Method Detail

addTableModelFilterListener

public void addTableModelFilterListener(TableModelFilterListener listener)
Add a TableModelFilterListener to the TableModelFilter.


clearFilter

public void clearFilter(int column)
Remove a filter from a column.


filter

public boolean filter(javax.swing.table.TableModel model,
                      int row)
Determine if a certain row should be shown in the table by checking it against all the current filters.


getFilter

public Autofilter getFilter(int column)
Retrieve the autofilter associated with a certain column.


isFiltered

public boolean isFiltered(int column)
Determine if a certain column is filtered.


removeTableModelFilterListener

public void removeTableModelFilterListener(TableModelFilterListener listener)
Remove a TableModelFilterListener from the TableModelFilter.


fireFilterChanged

public void fireFilterChanged()
Called whenever the filters assigned changes significantly, thus prompting a reload of the table model data.