|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sciapp.table.search.TableSearch
public class TableSearch
TableSearch searches through tables with the use of a Filter
.
Field Summary | |
---|---|
static int |
ALL_COLUMNS
denotes all columns to be searched |
static int |
COLUMN_MODE
mode indicating that the search will take place in a horizontal direction (column) |
protected int |
defaultColumn
the default column |
protected Filter |
filter
The filter being used. |
protected int |
mode
the search mode |
static int |
ROW_MODE
mode indicating that the search will take place in a vertical direction (row) |
Constructor Summary | |
---|---|
TableSearch(Filter filter)
Constructs a TableSearch. |
Method Summary | |
---|---|
int |
getDefaultColumn()
Returns the default column to search upon or ALL_COLUMNS. |
Filter |
getFilter()
Returns the associated filter. |
int |
getLastMatchingColumn()
Returns the matched column from the last search. |
int |
getMode()
Returns the current search mode. |
int |
search(TableModel model,
Object searchValue,
int fromRow,
int fromColumn,
boolean forward)
Searches the table and returns the matching row or -1 if no match was found. |
void |
setDefaultColumn(int defaultColumn)
Assigns the default column. |
void |
setFilter(Filter filter)
Assigns the filter to be used when searching. |
void |
setMode(int mode)
Assigns the search mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Filter filter
protected int mode
protected int defaultColumn
public static final int ALL_COLUMNS
public static final int ROW_MODE
public static final int COLUMN_MODE
Constructor Detail |
---|
public TableSearch(Filter filter)
Method Detail |
---|
public int getDefaultColumn()
public Filter getFilter()
public int getLastMatchingColumn()
getLastMatchingColumn
in interface Search
public int getMode()
public int search(TableModel model, Object searchValue, int fromRow, int fromColumn, boolean forward)
Search.getLastMatchingColumn()
.
search
in interface Search
model
- the table model to searchsearchValue
- the value to search forfromRow
- the search starting rowfromColumn
- the search starting columnforward
- the search direction
public void setDefaultColumn(int defaultColumn)
defaultColumn
- the default column to assignpublic void setFilter(Filter filter)
filter
- the filter to assignpublic void setMode(int mode)
mode
- the search mode to assign
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |