25 * <code>TextEditorChangeListener</code> that had been set on the |
25 * <code>TextEditorChangeListener</code> that had been set on the |
26 * <code>TextEditor</code> with a call to |
26 * <code>TextEditor</code> with a call to |
27 * {@link TextEditor#setTextEditorChangeListener setTextEditorChangeListener()}. |
27 * {@link TextEditor#setTextEditorChangeListener setTextEditorChangeListener()}. |
28 */ |
28 */ |
29 |
29 |
30 public interface TextEditorChangeListener { |
30 public interface TextEditorChangeListener |
|
31 { |
31 |
32 |
32 /** |
33 /** |
33 * Constant indicating the caret movement direction up. |
34 * Constant indicating the caret movement direction up. |
34 */ |
35 */ |
35 public static final int CARET_UP = 1; |
36 public static final int CARET_UP = 1; |
53 * Called by the implementation to indicate that a range of the content in |
54 * Called by the implementation to indicate that a range of the content in |
54 * the TextEditor has been changed either by user, prgrammatically or via |
55 * the TextEditor has been changed either by user, prgrammatically or via |
55 * external front end processors for advanced input methods. The parameters |
56 * external front end processors for advanced input methods. The parameters |
56 * indicate the range of the new modified text. The length parameter is |
57 * indicate the range of the new modified text. The length parameter is |
57 * always > 0. |
58 * always > 0. |
58 * |
59 * |
59 * @param index the index of the first character that is selected. |
60 * @param index the index of the first character that is selected. |
60 * @param length the length of selection as number of characters. |
61 * @param length the length of selection as number of characters. |
61 */ |
62 */ |
62 public void textChanged(int index, int length); |
63 public void textChanged(int index, int length); |
63 |
64 |
64 /** |
65 /** |
65 * Called by the implementation to indicate that the caret has been moved. |
66 * Called by the implementation to indicate that the caret has been moved. |
66 * The parameters indicate the new caret index and the movement direction in |
67 * The parameters indicate the new caret index and the movement direction in |
67 * relation the previous caret position. |
68 * relation the previous caret position. |
68 * |
69 * |
69 * @param newIndex the character index before which the caret is placed |
70 * @param newIndex the character index before which the caret is placed |
70 * after the movement |
71 * after the movement |
71 * @param movementDirection the caret movement direction; must be one of |
72 * @param movementDirection the caret movement direction; must be one of |
72 * CARET_UP, CARET_RIGHT, CARET_DOWN, or CARET_LEFT |
73 * CARET_UP, CARET_RIGHT, CARET_DOWN, or CARET_LEFT |
73 */ |
74 */ |
76 /** |
77 /** |
77 * Called by the implementation to indicate that a range of the content in |
78 * Called by the implementation to indicate that a range of the content in |
78 * the TextEditor has been selected. The selection have been set with |
79 * the TextEditor has been selected. The selection have been set with |
79 * programmatically or by user interaction. The parameters indicate the |
80 * programmatically or by user interaction. The parameters indicate the |
80 * range of the current selection. |
81 * range of the current selection. |
81 * |
82 * |
82 * @param index the index of the first character that is selected. |
83 * @param index the index of the first character that is selected. |
83 * @param length the length of selection as number of characters. |
84 * @param length the length of selection as number of characters. |
84 */ |
85 */ |
85 public void contentSelected(int index, int length); |
86 public void contentSelected(int index, int length); |
86 |
87 |