source: other-projects/rsyntax-textarea/src/java/org/fife/ui/rsyntaxtextarea/TokenOrientedView.java@ 25584

Last change on this file since 25584 was 25584, checked in by davidb, 12 years ago

Initial cut an a text edit area for GLI that supports color syntax highlighting

File size: 2.3 KB
Line 
1/*
2 * 08/06/2004
3 *
4 * TokenOrientedView.java - An interface for the syntax-highlighting token-
5 * oriented views for token-oriented methods.
6 *
7 * This library is distributed under a modified BSD license. See the included
8 * RSyntaxTextArea.License.txt file for details.
9 */
10package org.fife.ui.rsyntaxtextarea;
11
12
13/**
14 * An interface for the syntax-highlighting token oriented views for
15 * token-oriented methods. This way callers won't need to know what specific
16 * class a view is an instance of to access its tokens.<p>
17 *
18 * Currently, this interface is only useful for obtaining token lists for
19 * "physical lines" (i.e., a word-wrapped view's logical lines may be
20 * represented as several physical lines, thus getting the "physical line" above
21 * a given position may prove complicated).
22 *
23 * @author Robert Futrell
24 * @version 0.1
25 */
26public interface TokenOrientedView {
27
28
29 /**
30 * Returns a token list for the <i>physical</i> line above the physical
31 * line containing the specified offset into the document. Note that for
32 * a plain (non-wrapped) view, this is simply the token list for the
33 * logical line above the line containing <code>offset</code>, since lines
34 * are not wrapped. For a wrapped view, this may or may not be tokens from
35 * the same line.
36 *
37 * @param offset The offset in question.
38 * @return A token list for the physical (and in this view, logical) line
39 * before this one. If no physical line is above the one
40 * containing <code>offset</code>, <code>null</code> is returned.
41 */
42 public Token getTokenListForPhysicalLineAbove(int offset);
43
44
45 /**
46 * Returns a token list for the <i>physical</i> line below the physical
47 * line containing the specified offset into the document. Note that for
48 * a plain (non-wrapped) view, this is simply the token list for the
49 * logical line below the line containing <code>offset</code>, since lines
50 * are not wrapped. For a wrapped view, this may or may not be tokens from
51 * the same line.
52 *
53 * @param offset The offset in question.
54 * @return A token list for the physical (and in this view, logical) line
55 * after this one. If no physical line is after the one
56 * containing <code>offset</code>, <code>null</code> is returned.
57 */
58 public Token getTokenListForPhysicalLineBelow(int offset);
59
60
61}
Note: See TracBrowser for help on using the repository browser.