01: /*
02: * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
03: *
04: * The program is provided "as is" without any warranty express or
05: * implied, including the warranty of non-infringement and the implied
06: * warranties of merchantibility and fitness for a particular purpose.
07: * IBM will not be liable for any damages suffered by you as a result
08: * of using the Program. In no event will IBM be liable for any
09: * special, indirect or consequential damages or lost profits even if
10: * IBM has been advised of the possibility of their occurrence. IBM
11: * will not be liable for any third party claims against you.
12: */
13: package com.ibm.richtext.textpanel;
14:
15: /**
16: * A <TT>TextRange</TT> represents a range of text bounded by a
17: * start (inclusive), and a limit (exclusive). [start,limit)
18: */
19: final class TextRange {
20: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
21: /** the start of the range */
22: public int start = 0;
23: /** the end of the range */
24: public int limit = 0;
25:
26: /**
27: * Create a text range from two ints.
28: * @param start the start of the run
29: * @param limit the end of the run
30: */
31: public TextRange(int start, int limit) {
32: this .start = start;
33: this .limit = limit;
34: }
35:
36: /**
37: * Create a text range of 0, 0.
38: */
39: public TextRange() {
40: this .start = this .limit = 0;
41: }
42: }
|