Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2015-01-21 07:40:24 +0000
committerNiraj Modi2015-01-21 07:40:24 +0000
commit0807fd744e5e94148c439bd53fc07ead01587205 (patch)
treeb3ecd0f3baf01f04ccc9d8c1a4879a0508f1942c
parenteb4738ca4b3b0d6d147c4567a848e5ab5be48eef (diff)
downloadeclipse.platform.swt-nmodi/TransparentColor.tar.gz
eclipse.platform.swt-nmodi/TransparentColor.tar.xz
eclipse.platform.swt-nmodi/TransparentColor.zip
Bug 435384 - Add support for 'transparent' colorsnmodi/TransparentColor
- Updated Test Snippet Change-Id: Ib7db1edf7a7f90963626d1d1d5419d378248713c Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java
index b37396b406..08ef2e2c0c 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet365.java
@@ -31,11 +31,8 @@ public class Snippet365 {
static Group containerGroup;
static Canvas canvas;
static Composite composite;
- static TabFolder tabFolder;
static Group group;
static Sash sash;
- static CTabFolder cTab;
- static CTabFolder gradientCTab;
// Native
static Group nativeGroup;
@@ -47,18 +44,21 @@ public class Snippet365 {
static Button radio;
static Button check;
static Button push;
- static Table table;
- static Tree tree;
- static ExpandBar expandBar;
-
+
// Custom
static Group customGroup;
static CLabel cLabel;
static StyledText styledText;
static SashForm sashForm;
+ static CTabFolder cTab;
+ static CTabFolder gradientCTab;
// Item
static Group itemGroup;
+ static TabFolder tabFolder;
+ static Table table;
+ static Tree tree;
+ static ExpandBar expandBar;
// As Designed
static Group defaultBackgroundGroup;
@@ -136,7 +136,6 @@ public class Snippet365 {
customGroup.setBackground(display.getSystemColor(SWT.COLOR_TRANSPARENT));
cLabel.setBackground(display.getSystemColor(SWT.COLOR_TRANSPARENT));
cTab.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_TRANSPARENT));
- cTab.setSelectionBackground(Display.getDefault().getSystemColor(SWT.COLOR_TRANSPARENT));
gradientCTab.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_TRANSPARENT));
sashForm.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_TRANSPARENT));
for (Control control : sashForm.getChildren()) {
@@ -190,7 +189,6 @@ public class Snippet365 {
control.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
}
cTab.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- cTab.setSelectionBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
gradientCTab.setBackground(
new Color[] { display.getSystemColor(SWT.COLOR_RED),
@@ -219,6 +217,7 @@ public class Snippet365 {
// ContainerGroup
containerGroup = new Group(shell, SWT.NONE);
+ containerGroup.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
containerGroup.setText("CONTAINER");
layout = new RowLayout();
layout.spacing = 20;
@@ -226,6 +225,7 @@ public class Snippet365 {
// Native
nativeGroup = new Group(shell, SWT.NONE);
+ nativeGroup.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
nativeGroup.setText("NATIVE");
layout = new RowLayout();
layout.spacing = 20;
@@ -233,6 +233,7 @@ public class Snippet365 {
// Custom
customGroup = new Group(shell, SWT.NONE);
+ customGroup.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
customGroup.setText("CUSTOM");
layout = new RowLayout();
layout.spacing = 20;
@@ -240,6 +241,7 @@ public class Snippet365 {
// AsDesigned
defaultBackgroundGroup = new Group(shell, SWT.NONE);
+ defaultBackgroundGroup.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
defaultBackgroundGroup.setText("Default Background");
layout = new RowLayout();
layout.spacing = 20;
@@ -247,6 +249,7 @@ public class Snippet365 {
// ItemGroup
itemGroup = new Group(shell, SWT.NONE);
+ itemGroup.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
itemGroup.setText("ITEM");
layout = new RowLayout();
layout.spacing = 20;
@@ -437,8 +440,8 @@ public class Snippet365 {
item1.setHeight(20);
}
- shell.pack();
shell.open();
+ shell.pack();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();

Back to the top