summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt
diff options
context:
space:
mode:
authorSteve Northover <steve>2008-04-21 17:17:01 +0000
committerSteve Northover <steve>2008-04-21 17:17:01 +0000
commitd196ca2bdd99c1e9ef2c0ba72c71fa951c2881db (patch)
tree7c9804cd54bf50ac3604eb020ea49b1255e8dadf /bundles/org.eclipse.swt
parentb332e1ecb6421f664a18c1bcf96e2b94c24f1610 (diff)
downloadeclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.tar.gz
eclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.tar.xz
eclipse.platform.swt-d196ca2bdd99c1e9ef2c0ba72c71fa951c2881db.zip
NO_SCROLL must be set along with H_SCROLL or V_SCROLL to get only one scroll bar (for backwards compatibility)
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java13
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java13
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java14
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java13
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java14
12 files changed, 38 insertions, 125 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
index 5691d22bfb..b560a506d5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
@@ -277,20 +277,13 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
index a2f53b9a12..a0215152c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
@@ -406,20 +406,13 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
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 bb106ecce4..63689fb398 100755
--- 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
@@ -173,20 +173,13 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
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 53b5f6a731..feb09aa8a3 100755
--- 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
@@ -225,20 +225,13 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java
index c462e1c83f..dc804cffca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java
@@ -259,22 +259,16 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
style |= SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED;
+ //TEMPORARY CODE
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
index cdf3c51f10..dc01769da0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
@@ -300,22 +300,16 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
style |= SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED;
+ //TEMPORARY CODE
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
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 8437e90c55..b6c196c52d 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
@@ -150,22 +150,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* GTK is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
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 91a3476700..c98cfe941a 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
@@ -197,22 +197,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* GTK is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
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 4c2019c210..de22b57945 100755
--- 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
@@ -396,20 +396,13 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
}
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 d50cf7d58f..d50d89b95e 100755
--- 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
@@ -151,22 +151,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/*
* Note: Windows only supports TVS_NOSCROLL and TVS_NOHSCROLL.
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
index 6f8d11f61f..c21a18c789 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
@@ -179,22 +179,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* WPF is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
index 3d64c14992..6e6a15c625 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
@@ -175,22 +175,14 @@ static int checkStyle (int style) {
* Feature in Windows. Even when WS_HSCROLL or
* WS_VSCROLL is not specified, Windows creates
* trees and tables with scroll bars. The fix
- * is to set H_SCROLL and V_SCROLL when NO_SCROLL
- * is not set.
+ * is to set H_SCROLL and V_SCROLL.
*
* NOTE: This code appears on all platforms so that
* applications have consistent scroll bar behavior.
*/
- if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
- if ((style & SWT.NO_SCROLL) == 0) {
- style |= SWT.H_SCROLL | SWT.V_SCROLL;
- }
- } else {
- if ((style & SWT.NO_SCROLL) != 0) {
- style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- }
+ if ((style & SWT.NO_SCROLL) == 0) {
+ style |= SWT.H_SCROLL | SWT.V_SCROLL;
}
-
/* WPF is always FULL_SELECTION */
style |= SWT.FULL_SELECTION;
return checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);