1 /*
2 * $Id: ISelectionRangeComponent.java,v 1.1 2007/07/19 12:12:04 oeuillot Exp $
3 */
4 package org.rcfaces.core.internal.capability;
5
6 /**
7 *
8 * @author Olivier Oeuillot (latest modification by $Author: oeuillot $)
9 * @version $Revision: 1.1 $ $Date: 2007/07/19 12:12:04 $
10 */
11 public interface ISelectionRangeComponent extends ISelectionComponent {
12
13 /**
14 * Selects the item at the given zero-relative index in the receiver. If the
15 * item at the index was already selected, it remains selected. Indices that
16 * are out of range are ignored.
17 *
18 * @param index
19 * the index of the item to select
20 */
21 void select(int index);
22
23 /**
24 * Selects the items at the given zero-relative indices in the receiver. The
25 * current selection is not cleared before the new items are selected. If
26 * the item at a given index is not selected, it is selected. If the item at
27 * a given index was already selected, it remains selected. Indices that are
28 * out of range and duplicate indices are ignored. If the receiver is
29 * single-select and multiple indices are specified, then all indices are
30 * ignored.
31 *
32 * @param indices
33 * the array of indices for the items to select
34 */
35 void select(int[] indices);
36
37 /**
38 * Selects the items in the range specified by the given zero-relative
39 * indices in the receiver. The range of indices is inclusive. The current
40 * selection is not cleared before the new items are selected. If an item in
41 * the given range is not selected, it is selected. If an item in the given
42 * range was already selected, it remains selected. Indices that are out of
43 * range are ignored and no items will be selected if start is greater than
44 * end. If the receiver is single-select and there is more than one item in
45 * the given range, then all indices are ignored.
46 *
47 * @param start
48 * the start of the range
49 * @param end
50 * the end of the range
51 */
52 void select(int start, int end);
53
54 /**
55 * Deselects the item at the given zero-relative index in the receiver. If
56 * the item at the index was already deselected, it remains deselected.
57 * Indices that are out of range are ignored.
58 *
59 * @param index
60 * the index of the item to deselect
61 */
62 void deselect(int index);
63
64 /**
65 * Deselects the items at the given zero-relative indices in the receiver.
66 * If the item at the given zero-relative index in the receiver is selected,
67 * it is deselected. If the item at the index was not selected, it remains
68 * deselected. Indices that are out of range and duplicate indices are
69 * ignored.
70 *
71 * @param indices
72 * the array of indices for the items to deselect
73 */
74 void deselect(int[] indices);
75
76 /**
77 * Deselects the items at the given zero-relative indices in the receiver.
78 * If the item at the given zero-relative index in the receiver is selected,
79 * it is deselected. If the item at the index was not selected, it remains
80 * deselected. The range of the indices is inclusive. Indices that are out
81 * of range are ignored.
82 *
83 * @param start
84 * the start index of the items to deselect
85 * @param end
86 * the end index of the items to deselect
87 */
88 void deselect(int start, int end);
89 }