1 /*
2 * $Id: ICheckRangeComponent.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 ICheckRangeComponent extends ICheckComponent {
12
13 /**
14 * Checks the item at the given zero-relative index in the receiver. If the
15 * item at the index was already checked, it remains checked. Indices that
16 * are out of range are ignored.
17 *
18 * @param index
19 * the index of the item to check
20 */
21 void check(int index);
22
23 /**
24 * Checks the items at the given zero-relative indices in the receiver. If
25 * the item at a given index is not checked, it is checked. If the item at a
26 * given index was already checked, it remains checked. Indices that are out
27 * of range and duplicate indices are ignored. If the receiver is
28 * single-check and multiple indices are specified, then all indices are
29 * ignored.
30 *
31 * @param indices
32 * the array of indices for the items to check
33 */
34 void check(int[] indices);
35
36 /**
37 * Checks the items in the range specified by the given zero-relative
38 * indices in the receiver. The range of indices is inclusive. The current
39 * selection is not cleared before the new items are checked. If an item in
40 * the given range is not checked, it is checked. If an item in the given
41 * range was already selected, it remains selected. Indices that are out of
42 * range are ignored and no items will be checked if start is greater than
43 * end. If the receiver is single-check and there is more than one item in
44 * the given range, then all indices are ignored.
45 *
46 * @param start
47 * the start of the range
48 * @param end
49 * the end of the range
50 */
51 void check(int start, int end);
52
53 /**
54 * Unchecks the item at the given zero-relative index in the receiver. If
55 * the item at the index was already deselected, it remains deselected.
56 * Indices that are out of range are ignored.
57 *
58 * @param index
59 * the index of the item to uncheck
60 */
61 void uncheck(int index);
62
63 /**
64 * Unchecks the items at the given zero-relative indices in the receiver. If
65 * the item at the given zero-relative index in the receiver is selected, it
66 * is deselected. If the item at the index was not selected, it remains
67 * deselected. Indices that are out of range and duplicate indices are
68 * ignored.
69 *
70 * @param indices
71 * the array of indices for the items to uncheck
72 */
73 void uncheck(int[] indices);
74
75 /**
76 * Uncheks the items at the given zero-relative indices in the receiver. If
77 * the item at the given zero-relative index in the receiver is selected, it
78 * is deselected. If the item at the index was not selected, it remains
79 * deselected. The range of the indices is inclusive. Indices that are out
80 * of range are ignored.
81 *
82 * @param start
83 * the start index of the items to uncheck
84 * @param end
85 * the end index of the items to uncheck
86 */
87 void uncheck(int start, int end);
88 }