1
2
3
4
5
6
7
8
9
10
11
12
13 package sk.uniba.euromath.editor.selections;
14
15 import sk.baka.ikslibs.interval.DOMIntervalSet;
16
17 /***
18 * Interface common to all classes that provide a selection over xml document.
19 * Selection is coded in DOMIntervalSet.
20 */
21 public interface IDOMSelectionProvider {
22 /***
23 * Adds a listener for selection changes in this selection provider. Has no
24 * effect if an identical listener is already registered.
25 *
26 * @param listener
27 * a DOM selection changed listener
28 */
29 public void addSelectionChangedListener(
30 IDOMSelectionChangedListener listener);
31
32 /***
33 * Returns copy of the current selection of provider.
34 *
35 * @return the current selection by copy
36 */
37 public DOMIntervalSet getDOMSelection();
38
39 /***
40 * Removes the given selection change listener from this selection provider.
41 * Has no affect if listener is not registered.
42 *
43 * @param listener
44 * a DOM selection changed listener
45 */
46 public void removeSelectionChangedListener(
47 IDOMSelectionChangedListener listener);
48
49 /***
50 * Sets new selection for this selection provider.
51 *
52 * @param selection
53 * the new XML selection
54 */
55 public void setSelection(DOMIntervalSet selection);
56 }