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/cocoa | |
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/cocoa')
3 files changed, 22 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java index 150b67c135..2fc57e3873 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java @@ -1222,7 +1222,8 @@ boolean setScrollWidth () { /** * 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 @@ -1252,7 +1253,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. @@ -1292,7 +1294,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, @@ -1333,7 +1336,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/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index 267d895f2a..2bc300acf5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -2696,7 +2696,8 @@ boolean setScrollWidth (TableItem [] items, boolean set) { /** * 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 * @@ -2721,7 +2722,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. @@ -2754,7 +2756,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, @@ -2787,7 +2790,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> @@ -2813,7 +2817,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/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index ca35d19e35..26663c457c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -2960,7 +2960,8 @@ void setShouldScrollClipView (int /*long*/ id, int /*long*/ sel, boolean shouldS /** * 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> @@ -2986,7 +2987,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, |