swingx
Version 2005-08-19

org.jdesktop.swingx
Class JXList.ListSearchable

java.lang.Object
  extended by org.jdesktop.swingx.AbstractSearchable
      extended by org.jdesktop.swingx.JXList.ListSearchable
All Implemented Interfaces:
Searchable
Enclosing class:
JXList

public class JXList.ListSearchable
extends AbstractSearchable


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.AbstractSearchable
AbstractSearchable.SearchResult
 
Field Summary
 
Fields inherited from class org.jdesktop.swingx.AbstractSearchable
lastSearchResult, MATCH_HIGHLIGHTER, NO_MATCH
 
Constructor Summary
JXList.ListSearchable()
           
 
Method Summary
protected  AbstractSearchable.SearchResult findExtendedMatch(Pattern pattern, int row)
          called if sameRowIndex && !
protected  void findMatchAndUpdateState(Pattern pattern, int startRow, boolean backwards)
          Loops through the searchable until a match is found or the end is reached.
protected  AbstractSearchable.SearchResult findMatchAt(Pattern pattern, int row)
          Matches the cell content at row/col against the given Pattern.
protected  int getSize()
          returns the size of this searchable.
protected  void moveMatchMarker()
          Moves the match marker according to current found state.
 
Methods inherited from class org.jdesktop.swingx.AbstractSearchable
adjustStartPosition, createSearchResult, doSearch, isEmpty, isEqualPattern, isEqualStartIndex, isTrivialNoMatch, isValidIndex, moveStartPosition, search, search, search, search, search, search, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JXList.ListSearchable

public JXList.ListSearchable()
Method Detail

findMatchAndUpdateState

protected void findMatchAndUpdateState(Pattern pattern,
                                       int startRow,
                                       boolean backwards)
Description copied from class: AbstractSearchable
Loops through the searchable until a match is found or the end is reached. Updates internal search state.

Specified by:
findMatchAndUpdateState in class AbstractSearchable
Parameters:
pattern - Pattern that we will try to locate
startRow - position in the document in the appropriate coordinates from which we will start search or -1 to start from the beginning
backwards - true if we should perform search towards the beginning

findExtendedMatch

protected AbstractSearchable.SearchResult findExtendedMatch(Pattern pattern,
                                                            int row)
Description copied from class: AbstractSearchable
called if sameRowIndex && !hasEqualRegEx. Matches the cell at row/lastFoundColumn against the pattern. PRE: lastFoundColumn valid.

Specified by:
findExtendedMatch in class AbstractSearchable
Parameters:
pattern - Pattern that we will try to match
row - position at which we will get the value to match with the provided Pattern
Returns:
result of the match; AbstractSearchable.SearchResult

findMatchAt

protected AbstractSearchable.SearchResult findMatchAt(Pattern pattern,
                                                      int row)
Matches the cell content at row/col against the given Pattern. Returns an appropriate SearchResult if matching or null if no matching

Parameters:
pattern -
row - a valid row index in view coordinates
Returns:
SearchResult if matched otherwise null

getSize

protected int getSize()
Description copied from class: AbstractSearchable
returns the size of this searchable.

Specified by:
getSize in class AbstractSearchable
Returns:
size of this searchable

moveMatchMarker

protected void moveMatchMarker()
Description copied from class: AbstractSearchable
Moves the match marker according to current found state.

Specified by:
moveMatchMarker in class AbstractSearchable

swingx
Version 2005-08-19