Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2004-04-13 19:29:22 +0000
committerGrant Gayed2004-04-13 19:29:22 +0000
commita5f3d896a0552e8d2027982eeac1d90aabbd97bd (patch)
tree6e0b7678153e8f37d32e6a4b8ccf8f96050733fa /examples
parent7881c9403ea1dd06d9382371b03b6f738d08696a (diff)
downloadeclipse.platform.swt-a5f3d896a0552e8d2027982eeac1d90aabbd97bd.tar.gz
eclipse.platform.swt-a5f3d896a0552e8d2027982eeac1d90aabbd97bd.tar.xz
eclipse.platform.swt-a5f3d896a0552e8d2027982eeac1d90aabbd97bd.zip
add FLAT style
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
index 849787c6ad..c4f5f74a08 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
@@ -18,7 +18,7 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.events.*;
class CoolBarTab extends Tab {
- Button dropDownButton, lockedButton;
+ Button dropDownButton, lockedButton, flatButton;
/* Example widgets and group that contains them */
CoolBar coolBar;
@@ -74,6 +74,7 @@ class CoolBarTab extends Tab {
/* Compute the widget style */
int toolBarStyle = SWT.FLAT;
if (borderButton.getSelection()) style |= SWT.BORDER;
+ if (flatButton.getSelection()) style |= SWT.FLAT;
if (dropDownButton.getSelection()) itemStyle |= SWT.DROP_DOWN;
/*
@@ -201,6 +202,8 @@ class CoolBarTab extends Tab {
/* Create the extra widget */
borderButton = new Button (styleGroup, SWT.CHECK);
borderButton.setText ("SWT.BORDER");
+ flatButton = new Button (styleGroup, SWT.CHECK);
+ flatButton.setText ("SWT.FLAT");
Group itemGroup = new Group(styleGroup, SWT.NONE);
itemGroup.setLayout (new GridLayout ());
itemGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
@@ -256,6 +259,7 @@ class CoolBarTab extends Tab {
void setExampleWidgetState () {
super.setExampleWidgetState ();
borderButton.setSelection ((coolBar.getStyle () & SWT.BORDER) != 0);
+ flatButton.setSelection ((coolBar.getStyle () & SWT.FLAT) != 0);
dropDownButton.setSelection ((coolBar.getItem(0).getStyle () & SWT.DROP_DOWN) != 0);
setWidgetLocked ();
}

Back to the top