KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > lib > terminalemulator > LogicalLineVisitor


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is Terminal Emulator.
16  * The Initial Developer of the Original Software is Sun Microsystems, Inc..
17  * Portions created by Sun Microsystems, Inc. are Copyright (C) 2001.
18  * All Rights Reserved.
19  *
20  * Contributor(s): Ivan Soleimanipour.
21  */

22
23 /*
24  * "LogicalLineVisitor.java"
25  * LogicalLineVisitor.java 1.1 01/07/24
26  */

27
28 package org.netbeans.lib.terminalemulator;
29
30 /**
31  * Passed to one of visitLogicalLines() or reverseVisitLogicalLines().
32  */

33
34 public interface LogicalLineVisitor {
35     /**
36      * Called for each logical line.
37      * <p>
38      * 'text' contains the actual text of a complete line which may be
39      * wrapped multiple times. 'begin' and 'end' mark the region.
40      * <p>
41      * Note that for the first line 'begin' will match the 'begin' passed to
42      * visitLogicalLines(), so watch out if you specify a visitation range
43      * that starts in the middle of a line.
44      * <p>
45      * Normally end.row == begin.row, but if the logical line was wrapped,
46      * end.row > begin.row.
47      * <p>
48      * 'line' is intended to represent a line number, however if the
49      * visitation range isn't the whole document it should be interpreted only
50      * as a serial number and in the case of reverseVisitLogicalLines() the
51      * sequence of line numbers will be backwards.
52      * <p>
53      * If you locate something in 'text' and need to convert it back to
54      * a Coord use extentInLogicalLine().
55      */

56
57     public boolean visit(int line, Coord begin, Coord end, String JavaDoc text);
58 }
59
Popular Tags