01: /*
02: * Sun Public License Notice
03: *
04: * The contents of this file are subject to the Sun Public License
05: * Version 1.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://www.sun.com/
08: *
09: * The Original Code is NetBeans. The Initial Developer of the Original
10: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
11: * Microsystems, Inc. All Rights Reserved.
12: */
13:
14: package org.netbeans.editor;
15:
16: /**
17: * Process the batches of the text in the document. This interface can be passed
18: * to the BaseDocument.processText() and this method then calls the
19: * processTextBatch() to process the text batches.
20: *
21: * @author Miloslav Metelka
22: * @version 1.00
23: */
24:
25: public interface TextBatchProcessor {
26:
27: /**
28: * Process one batch of the text.
29: *
30: * @doc document to work with
31: * @startPos starting position of the batch
32: * @endPos ending position of the batch
33: * @lastBatch whether this batch is the last one in the text area that is
34: * searched.
35: * @return non-negative number to stop the batch processing. The returned
36: * value is remembered and returned from BaseDocument.processText().
37: * Negative value means to continue with the next batch.
38: */
39: public int processTextBatch(BaseDocument doc, int startPos,
40: int endPos, boolean lastBatch);
41:
42: }
|