Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.search
Class ListSearchable

    java.lang.Object
      org.jdesktop.swingx.search.AbstractSearchable
          org.jdesktop.swingx.search.ListSearchable

All Implemented Interfaces:
  Searchable

    public class ListSearchable

extends AbstractSearchable

Nested Class Summary

Nested classes/interfaces inherited from class org.jdesktop.swingx.search.AbstractSearchable
`AbstractSearchable.SearchResult`

Field Summary
`protected JXList` | `list`

Fields inherited from class org.jdesktop.swingx.search.AbstractSearchable
`lastSearchResult, MATCH_HIGHLIGHTER`

Constructor Summary
`ListSearchable(JXList list)`

Method Summary
`protected void` | `addHighlighter(Highlighter highlighter)` Adds the highlighter to the target.
`protected AbstractSearchable.SearchResult` | `findExtendedMatch(java.util.regex.Pattern pattern, int row)` Matches the cell at row/lastFoundColumn against the pattern.
`protected void` | `findMatchAndUpdateState(java.util.regex.Pattern pattern, int startRow, boolean backwards)` Loops through the searchable until a match is found or the end is reached.
`protected AbstractSearchable.SearchResult` | `findMatchAt(java.util.regex.Pattern pattern, int row)` Matches the cell content at row/col against the given Pattern.
`protected Highlighter[]` | `getHighlighters()` Returns the highlighters registered on the search target.
`protected int` | `getSize()` Returns the size of this searchable.
`JXList` | `getTarget()` It's the responsibility of subclasses to covariant override.
`protected void` | `moveMatchByHighlighter()` use and move the match highlighter.
`protected void` | `moveMatchBySelection()`
`protected void` | `moveMatchMarker()` Moves the match marker according to current found state.
`protected void` | `removeHighlighter(Highlighter searchHighlighter)` Removes the highlighter.

Methods inherited from class org.jdesktop.swingx.search.AbstractSearchable
`adjustStartPosition, convertColumnIndexToModel, createMatchHighlighter, createMatchPredicate, createSearchResult, doSearch, ensureInsertedSearchHighlighters, getConfiguredMatchHighlighter, getMatchHighlighter, hasMatch, isEmpty, isEqualPattern, isEqualStartIndex, isTrivialNoMatch, isValidIndex, markByHighlighter, moveStartPosition, search, search, search, search, search, search, setMatchHighlighter, updateState`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### list

    protected JXList list

Constructor Detail

### ListSearchable

    public ListSearchable(JXList list)

Method Detail

### findMatchAndUpdateState

    protected void findMatchAndUpdateState(java.util.regex.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(java.util.regex.Pattern pattern,
                                                                int row)

  Description copied from class: `AbstractSearchable`
  Matches the cell at row/lastFoundColumn against the pattern. Called if sameRowIndex && !hasEqualRegEx. 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(java.util.regex.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()

  Returns the size of this searchable.

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

### getTarget

    public JXList getTarget()

  It's the responsibility of subclasses to covariant override.

  Specified by:
    `getTarget` in class `AbstractSearchable`
  Returns:
    the target component

### moveMatchMarker

    protected void moveMatchMarker()

  Moves the match marker according to current found state.

  Specified by:
    `moveMatchMarker` in class `AbstractSearchable`

### moveMatchBySelection

    protected void moveMatchBySelection()

### moveMatchByHighlighter

    protected void moveMatchByHighlighter()

  use and move the match highlighter. PRE: markByHighlighter

### removeHighlighter

    protected void removeHighlighter(Highlighter searchHighlighter)

  Description copied from class: `AbstractSearchable`
  Removes the highlighter.

  Specified by:
    `removeHighlighter` in class `AbstractSearchable`
  Parameters:
    `searchHighlighter` -

### getHighlighters

    protected Highlighter[] getHighlighters()

  Description copied from class: `AbstractSearchable`
  Returns the highlighters registered on the search target.

  Specified by:
    `getHighlighters` in class `AbstractSearchable`
  Returns:
    all registered highlighters

### addHighlighter

    protected void addHighlighter(Highlighter highlighter)

  Description copied from class: `AbstractSearchable`
  Adds the highlighter to the target.

  Specified by:
    `addHighlighter` in class `AbstractSearchable`
  Parameters:
    `highlighter` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.