1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.textEditor;
13
14 /***
15 * Positions caret if has caret.
16 *
17 * @author Martin Kollar Created on 1.8.2005
18 */
19 public interface ICaretPositioner {
20
21 /***
22 * Returns ITextLocator of TextPiece where the Caret is created
23 */
24
25
26
27
28
29 /***
30 * Test if this positioner has caret, it means caret is visible and
31 * positioned by this caret positioner.
32 *
33 * @return true if positioner has caret
34 */
35 public boolean hasCaret();
36
37 /***
38 * Returns offset in TextPiece where caret is. Caret must be visible and
39 * must be positioned by this positioner. Otherwise IllegalArgumentException
40 * is thrown.
41 *
42 * @return valid caret offset
43 */
44 public int getCaretOffset();
45
46 /***
47 * Hides the Caret
48 */
49 public void hideCaret();
50
51 /***
52 * Shows the Caret
53 */
54 public void showCaret();
55
56 /***
57 * Shows Caret before character at position index.
58 *
59 * @param index
60 * index of character before which Caret to show.
61 */
62 public void showCaretBefore(int index);
63
64 }