-
Notifications
You must be signed in to change notification settings - Fork 32
GradientComposite
lcaron edited this page Jul 7, 2015
·
1 revision
This is a composite that displays a gradient in its background.
The gradient composite is a composite with just a little taste of color behind :) By default, the gradient behind is grey to white. You can change the colors by modifying the "gradientEnd" and "gradientStart" properties.
The usage is similar to the Composite widget :
final GradientComposite composite = new GradientComposite(shell, SWT.NONE);
composite.setGradientEnd(display.getSystemColor(SWT.COLOR_WHITE));
composite.setGradientStart(display.getSystemColor(SWT.COLOR_DARK_RED));
An example called SnippetGradientComposite.java is avalaible in the directory src/test/java/org/mihalis/opal/gradientComposite.
This example is also available here : https://github.com/lcaron/opal/blob/master/src/test/java/org/mihalis/opal/gradientComposite/SnippetGradientComposite.java