diff options
author | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-06-18 12:08:32 -0400 |
---|---|---|
committer | Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com> | 2012-06-18 12:08:32 -0400 |
commit | 0f3c1bcc03658eaff93340278a73ca8a2bca2a39 (patch) | |
tree | f982cd3ea44180529377d2b1b9796dc3a4c2eadc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt | |
parent | f037ccfbac1b9b0d98325567696ff0d7b8e9cadc (diff) | |
download | eclipse.platform.swt-0f3c1bcc03658eaff93340278a73ca8a2bca2a39.tar.gz eclipse.platform.swt-0f3c1bcc03658eaff93340278a73ca8a2bca2a39.tar.xz eclipse.platform.swt-0f3c1bcc03658eaff93340278a73ca8a2bca2a39.zip |
Bug 382840 - Table#setSelection(int) should specify that it shows the
selection
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt')
3 files changed, 22 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 9ee8e083dd..30ddc1cc21 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -1317,7 +1317,8 @@ public void setItems (String [] items) { /** * Selects the item at the given zero-relative index in the receiver. * If the item at the index was already selected, it remains selected. - * The current selection is first cleared, then the new item is selected. + * The current selection is first cleared, then the new item is selected, + * and if necessary the receiver is scrolled to make the new selection visible. * Indices that are out of range are ignored. * * @param index the index of the item to select @@ -1339,7 +1340,8 @@ public void setSelection (int index) { /** * Selects the items in the range specified by the given zero-relative * indices in the receiver. The range of indices is inclusive. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Indices that are out of range are ignored and no items will be selected * if start is greater than end. @@ -1374,7 +1376,8 @@ public void setSelection (int start, int end) { /** * Selects the items at the given zero-relative indices in the receiver. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Indices that are out of range and duplicate indices are ignored. * If the receiver is single-select and multiple indices are specified, @@ -1408,7 +1411,8 @@ public void setSelection(int[] indices) { /** * Sets the receiver's selection to be the given array of items. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Items that are not in the receiver are ignored. * If the receiver is single-select and multiple items are specified, diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 158e3c1a09..74bea0bb9b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -3184,7 +3184,8 @@ public void setSortDirection (int direction) { /** * Selects the item at the given zero-relative index in the receiver. - * The current selection is first cleared, then the new item is selected. + * The current selection is first cleared, then the new item is selected, + * and if necessary the receiver is scrolled to make the new selection visible. * * @param index the index of the item to select * @@ -3208,7 +3209,8 @@ public void setSelection (int index) { /** * Selects the items in the range specified by the given zero-relative * indices in the receiver. The range of indices is inclusive. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Indices that are out of range are ignored and no items will be selected * if start is greater than end. @@ -3245,7 +3247,8 @@ public void setSelection (int start, int end) { /** * Selects the items at the given zero-relative indices in the receiver. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Indices that are out of range and duplicate indices are ignored. * If the receiver is single-select and multiple indices are specified, @@ -3282,7 +3285,8 @@ public void setSelection (int [] indices) { /** * Sets the receiver's selection to the given item. - * The current selection is cleared before the new item is selected. + * The current selection is cleared before the new item is selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * If the item is not in the receiver, then it is ignored. * </p> @@ -3308,7 +3312,8 @@ public void setSelection (TableItem item) { /** * Sets the receiver's selection to be the given array of items. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary the receiver is scrolled to make the new selection visible. * <p> * Items that are not in the receiver are ignored. * If the receiver is single-select and multiple items are specified, diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 467fe70bbe..e49ef7abc4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -3053,7 +3053,8 @@ void setScrollWidth (int /*long*/ column, TreeItem item) { /** * Sets the receiver's selection to the given item. - * The current selection is cleared before the new item is selected. + * The current selection is cleared before the new item is selected, + * and if necessary, the receiver is scrolled to make the new selection visible. * <p> * If the item is not in the receiver, then it is ignored. * </p> @@ -3079,7 +3080,8 @@ public void setSelection (TreeItem item) { /** * Sets the receiver's selection to be the given array of items. - * The current selection is cleared before the new items are selected. + * The current selection is cleared before the new items are selected, + * and if necessary, the receiver is scrolled to make the new selection visible. * <p> * Items that are not in the receiver are ignored. * If the receiver is single-select and multiple items are specified, |