|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.search.AbstractSearchable
org.jdesktop.swingx.search.TreeSearchable
public class TreeSearchable
A searchable targetting the visible rows of a JXTree. PENDING: value to string conversion should behave as nextMatch (?) which uses the convertValueToString().
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.swingx.search.AbstractSearchable |
---|
AbstractSearchable.SearchResult |
Field Summary | |
---|---|
protected JXTree |
tree
|
Fields inherited from class org.jdesktop.swingx.search.AbstractSearchable |
---|
lastSearchResult, MATCH_HIGHLIGHTER |
Constructor Summary | |
---|---|
TreeSearchable(JXTree tree)
|
Method Summary | |
---|---|
protected void |
addHighlighter(Highlighter highlighter)
Adds the highlighter to the target. |
protected AbstractSearchable.SearchResult |
findExtendedMatch(Pattern pattern,
int row)
Matches the cell at row/lastFoundColumn against the pattern. |
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 Highlighter[] |
getHighlighters()
Returns the highlighters registered on the search target. |
protected int |
getSize()
Returns the size of this searchable. |
JXTree |
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 |
---|
protected JXTree tree
Constructor Detail |
---|
public TreeSearchable(JXTree tree)
tree
- Method Detail |
---|
protected void findMatchAndUpdateState(Pattern pattern, int startRow, boolean backwards)
AbstractSearchable
findMatchAndUpdateState
in class AbstractSearchable
pattern
- Pattern
that we will try to locatestartRow
- position in the document in the appropriate coordinates
from which we will start search or -1 to start from the beginningbackwards
- true
if we should perform search towards the beginningprotected AbstractSearchable.SearchResult findExtendedMatch(Pattern pattern, int row)
AbstractSearchable
findExtendedMatch
in class AbstractSearchable
pattern
- Pattern
that we will try to matchrow
- position at which we will get the value to match with the provided Pattern
AbstractSearchable.SearchResult
protected AbstractSearchable.SearchResult findMatchAt(Pattern pattern, int row)
pattern
- row
- a valid row index in view coordinates
a valid column index in view coordinates
SearchResult
if matching or
null if no matchingprotected int getSize()
AbstractSearchable
getSize
in class AbstractSearchable
public JXTree getTarget()
getTarget
in class AbstractSearchable
protected void moveMatchMarker()
moveMatchMarker
in class AbstractSearchable
protected void moveMatchBySelection()
protected void moveMatchByHighlighter()
protected void removeHighlighter(Highlighter searchHighlighter)
AbstractSearchable
removeHighlighter
in class AbstractSearchable
searchHighlighter
- protected Highlighter[] getHighlighters()
AbstractSearchable
getHighlighters
in class AbstractSearchable
protected void addHighlighter(Highlighter highlighter)
AbstractSearchable
addHighlighter
in class AbstractSearchable
highlighter
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |