summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse
diff options
context:
space:
mode:
authorCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-06-18 12:08:32 -0400
committerCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-06-18 12:08:32 -0400
commit0f3c1bcc03658eaff93340278a73ca8a2bca2a39 (patch)
treef982cd3ea44180529377d2b1b9796dc3a4c2eadc /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse
parentf037ccfbac1b9b0d98325567696ff0d7b8e9cadc (diff)
downloadeclipse.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/win32/org/eclipse')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java6
3 files changed, 22 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index cdd59b011c..26376aed54 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -1306,7 +1306,8 @@ void setScrollWidth (int newWidth, boolean grow) {
/**
* 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,
@@ -1340,7 +1341,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,
@@ -1392,7 +1394,8 @@ public void setSelection (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
@@ -1416,7 +1419,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.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 7c5c339b98..1f528b680b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -4983,7 +4983,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
/**
* 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,
@@ -5017,7 +5018,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>
@@ -5043,7 +5045,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,
@@ -5084,7 +5087,8 @@ public void setSelection (TableItem [] items) {
/**
* 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
*
@@ -5107,7 +5111,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.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 5d938ca006..71b64db533 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -4872,7 +4872,8 @@ void setSelection (int /*long*/ hItem, TVITEM tvItem, TreeItem [] selection) {
/**
* 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>
@@ -4898,7 +4899,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,