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.ext;
15:
16: import javax.swing.text.Position;
17:
18: import org.netbeans.editor.TokenItem;
19:
20: /**
21: * Position consisting of the token-item and the offset inside it. The offset
22: * can range from zero to the last character in the token-text. The position
23: * right after the last character in the last token is expressed by token equal
24: * to null and offset equal to zero. The equality is defined as having the same
25: * offset in the same token. The token is compared just by equality operator.
26: *
27: * @author Miloslav Metelka
28: * @version 1.00
29: */
30:
31: public interface FormatTokenPosition {
32:
33: /** Get the token-item in which the position resides. */
34: public TokenItem getToken();
35:
36: /** Get the offset inside the token-item. */
37: public int getOffset();
38:
39: /**
40: * Get the bias of the position. Either Position.Bias.Forward or
41: * Position.Bias.Backward.
42: */
43: public Position.Bias getBias();
44:
45: }
|