Package org.jdesktop.swingx.search
Interface Searchable
- All Known Implementing Classes:
AbstractSearchable
,JXEditorPane.DocumentSearchable
,ListSearchable
,TableSearchable
,TreeSearchable
public interface Searchable
Interface that used to implement search logic in all the search capable components.
- Author:
- Ramesh Gupta
-
Method Summary
Modifier and TypeMethodDescriptionint
SearchsearchString
from the beginning of a document.int
SearchsearchString
from the given position in a document.int
SearchsearchString
in the given direction from the some position in a document.int
Search for the pattern from the beginning of the document.int
Search for the pattern from the start index.int
Search for the pattern from the start index.
-
Method Details
-
search
SearchsearchString
from the beginning of a document.- Parameters:
searchString
-String
we should find in a document.- Returns:
- index of matched
String
or -1 if a match cannot be found.
-
search
SearchsearchString
from the given position in a document.- Parameters:
searchString
-String
we should find in a document.startIndex
- Start position in a document or -1 if we want to search from the beginning.- Returns:
- index of matched
String
or -1 if a match cannot be found.
-
search
SearchsearchString
in the given direction from the some position in a document.- Parameters:
searchString
-String
we should find in a document.startIndex
- Start position in a document or -1 if we want to search from the beginning.backward
- Indicates search direction, will search from the given position towards the beginning of a document if this parameter istrue
.- Returns:
- index of matched
String
or -1 if a match cannot be found.
-
search
Search for the pattern from the beginning of the document.- Parameters:
pattern
- Pattern for search- Returns:
- index of matched
Pattern
or -1 if a match cannot be found.
-
search
Search for the pattern from the start index.- Parameters:
pattern
- Pattern for searchstartIndex
- starting index of search. If -1 then start from the beginning- Returns:
- index of matched pattern or -1 if a match cannot be found.
-
search
Search for the pattern from the start index.- Parameters:
pattern
- Pattern for searchstartIndex
- starting index of search. If -1 then start from the beginningbackward
- indicates the direction if true then search is backwards- Returns:
- index of matched pattern or -1 if a match cannot be found.
-