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: import com.ibm.richtext.styledtext.MConstText;
16: import com.ibm.richtext.textformat.TextOffset;
17:
18: /**
19: * This class is used to pass a REPLACE command to Behaviors.
20: */
21: final class TextReplacement {
22:
23: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
24: private int fStart;
25: private int fLimit;
26: private MConstText fText;
27: private TextOffset fSelStart;
28: private TextOffset fSelLimit;
29:
30: TextReplacement(int start, int limit, MConstText text,
31: TextOffset selStart, TextOffset selLimit) {
32:
33: fStart = start;
34: fLimit = limit;
35: fText = text;
36: fSelStart = selStart;
37: fSelLimit = selLimit;
38: }
39:
40: int getStart() {
41:
42: return fStart;
43: }
44:
45: int getLimit() {
46:
47: return fLimit;
48: }
49:
50: MConstText getText() {
51:
52: return fText;
53: }
54:
55: TextOffset getSelectionStart() {
56:
57: return fSelStart;
58: }
59:
60: TextOffset getSelectionLimit() {
61:
62: return fSelLimit;
63: }
64: }
|