|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.search.AbstractSearchable
public abstract class AbstractSearchable
An abstract implementation of Searchable supporting incremental search. Keeps internal state to represent the previous search result. For all methods taking a String as parameter: compiles the String to a Pattern as-is and routes to the central method taking a Pattern.
Nested Class Summary | |
---|---|
static class |
AbstractSearchable.SearchResult
A convenience class to hold search state. |
Field Summary | |
---|---|
static java.lang.String |
MATCH_HIGHLIGHTER
key for client property to use SearchHighlighter as match marker. |
Constructor Summary | |
---|---|
AbstractSearchable()
|
Method Summary | |
---|---|
abstract javax.swing.JComponent |
getTarget()
It's the responsibility of subclasses to covariant override. |
int |
search(java.util.regex.Pattern pattern)
Performs a forward search starting at the beginning across the Searchable using the pattern; Pattern . |
int |
search(java.util.regex.Pattern pattern,
int startIndex)
Performs a forward search starting at the given startIndex using the Pattern; Pattern . |
int |
search(java.util.regex.Pattern pattern,
int startIndex,
boolean backwards)
Performs a search starting at the given startIndex using the pattern; Pattern . |
int |
search(java.lang.String searchString)
Performs a forward search starting at the beginning across the Searchable using String that represents a regex pattern; Pattern . |
int |
search(java.lang.String searchString,
int startIndex)
Performs a forward search starting at the given startIndex using String that represents a regex pattern; Pattern . |
int |
search(java.lang.String searchString,
int startIndex,
boolean backward)
Performs a search starting at the given startIndex using String that represents a regex pattern; Pattern . |
void |
setMatchHighlighter(AbstractHighlighter hl)
Sets the AbstractHighlighter to use as match marker, if enabled. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MATCH_HIGHLIGHTER
Constructor Detail |
---|
public AbstractSearchable()
Method Detail |
---|
public int search(java.lang.String searchString)
Pattern
.
search
in interface Searchable
searchString
- String
that we will try to locate
public int search(java.lang.String searchString, int startIndex)
Pattern
.
search
in interface Searchable
searchString
- String
that we will try to locatestartIndex
- position in the document in the appropriate coordinates
from which we will start search or -1 to start from the beginning
public int search(java.lang.String searchString, int startIndex, boolean backward)
Pattern
. The search direction
depends on the boolean parameter: forward/backward if false/true, respectively.
search
in interface Searchable
searchString
- String
that we will try to locatestartIndex
- position in the document in the appropriate coordinates
from which we will start search or -1 to start from the beginningbackward
- true
if we should perform search towards the beginning
public int search(java.util.regex.Pattern pattern)
Pattern
.
search
in interface Searchable
pattern
- Pattern
that we will try to locate
public int search(java.util.regex.Pattern pattern, int startIndex)
Pattern
.
search
in interface Searchable
pattern
- Pattern
that we will try to locatestartIndex
- position in the document in the appropriate coordinates
from which we will start search or -1 to start from the beginning
public int search(java.util.regex.Pattern pattern, int startIndex, boolean backwards)
Pattern
.
The search direction depends on the boolean parameter:
forward/backward if false/true, respectively.Updates visible and internal search state.
search
in interface Searchable
pattern
- Pattern
that we will try to locatestartIndex
- 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 beginning
public abstract javax.swing.JComponent getTarget()
public void setMatchHighlighter(AbstractHighlighter hl)
hl
- the Highlighter to use as match marker.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |