Searchable
public class TreeSearchable extends AbstractSearchable
AbstractSearchable.SearchResult
Modifier and Type | Field | Description |
---|---|---|
protected JXTree |
tree |
lastSearchResult, MATCH_HIGHLIGHTER, NO_MATCH
Constructor | Description |
---|---|
TreeSearchable(JXTree tree) |
Modifier and Type | Method | Description |
---|---|---|
protected AbstractSearchable.SearchResult |
findExtendedMatch(java.util.regex.Pattern pattern,
int row) |
called if sameRowIndex && !hasEqualRegEx.
|
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 int |
getSize() |
returns the size of this searchable.
|
protected boolean |
hasMatch(AbstractSearchable.SearchResult result) |
|
protected void |
moveMatchMarker() |
Moves the match marker according to current found state.
|
adjustStartPosition, createSearchResult, doSearch, isEmpty, isEqualPattern, isEqualStartIndex, isTrivialNoMatch, isValidIndex, moveStartPosition, search, search, search, search, search, search, updateState
protected JXTree tree
public TreeSearchable(JXTree tree)
tree
- protected void findMatchAndUpdateState(java.util.regex.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(java.util.regex.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(java.util.regex.Pattern pattern, int row)
pattern
- row
- a valid row index in view coordinates
a valid column index in view coordinatesSearchResult
if matching or
null if no matchingprotected int getSize()
AbstractSearchable
getSize
in class AbstractSearchable
protected boolean hasMatch(AbstractSearchable.SearchResult result)
result
- true
if the result
contains a match;
false
otherwiseprotected void moveMatchMarker()
AbstractSearchable
moveMatchMarker
in class AbstractSearchable