Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2012-06-18 16:08:32 +0000
committerCarolyn MacLeod2012-06-18 16:08:32 +0000
commit0f3c1bcc03658eaff93340278a73ca8a2bca2a39 (patch)
treef982cd3ea44180529377d2b1b9796dc3a4c2eadc
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
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java15
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java6
-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
9 files changed, 66 insertions, 33 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,
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,
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,

Back to the top