1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.textEditor;
13
14 /***
15 * Interface to properties of text piece.
16 *
17 * @author Tomáš Studva, Martin Kollár
18 */
19 public interface ITextPieceInfo {
20
21 /***
22 * @deprecated ak sa ti to hodi pouzit informuj ma. Studva
23 * @param nodeID
24 * @param offset
25 * @param length
26 * @return bla bla
27 */
28 @Deprecated
29 public int contains(String nodeID, int offset, int length);
30
31 /***
32 * Unique identification of this text piece in whole document.
33 *
34 * @return id of this text piece
35 */
36 public String getID();
37
38 /***
39 * Identification of node holding the text (text node, cdata node,
40 * attribute).
41 *
42 * @return id of node containing this text
43 */
44 public String getNodeID();
45
46 /***
47 * Index of the first character of this text piece in whole displayed text
48 * of textual node.
49 *
50 * @return globaloffset of first character
51 */
52 public int getOffset();
53
54 /***
55 * Index of the first character of this text piece in whole original text of
56 * textual node.
57 *
58 * @return globaloffset of first character
59 */
60 public int getOriginalOffset();
61
62 /***
63 * Index of last character of this text piece in whole displayed text
64 *
65 * @return global offset of last character
66 */
67 public int getLastIndex();
68
69 /***
70 * Length of the text piece.
71 *
72 * @return length
73 */
74 public int getLength();
75
76 /***
77 * Returns text of this text piece.
78 *
79 * @return text value.
80 */
81 public String getText();
82 }