|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdjustFinder
Advanced finder that can adjust the start and limit position
of the search. The finder can be used in the BaseDocument.find()
which calls its adjust-methods automatically.
The order of the methods called for the search is
1. adjustStartPos() is called
2. adjustStartPos() is called
3. reset() is called
If the search is void i.e. doc.find(finder, pos, pos)
is called, no adjust-methods are called, only the reset()
is called.
For backward search the start-position is higher than the limit-position.
The relation startPos < endPos defines whether the search
will be forward or backward. The adjust-methods could in fact
revert this relation turning the forward search into the backward one
and vice versa. This is not allowed. If that happens the search
is considered void.
The adjust-methods must NOT use the shortcut -1 for the end of document.
Method Summary | |
---|---|
int |
adjustLimitPos(BaseDocument doc,
int limitPos)
Adjust the limit position of the search (it's the position where the search will end) to be either the same or greater. |
int |
adjustStartPos(BaseDocument doc,
int startPos)
Adjust start position of the search to be either the same or lower. |
Methods inherited from interface org.netbeans.editor.Finder |
---|
find, isFound, reset |
Method Detail |
---|
int adjustStartPos(BaseDocument doc, int startPos)
doc
- document to search onstartPos
- start position originally requested in BaseDocument.find().
int adjustLimitPos(BaseDocument doc, int limitPos)
doc
- document to search onlimitPos
- limit position originally requested in BaseDocument.find()
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |