Time for action – modal and other effects
There are a number of style bits that are applicable to windows, and some useful methods to affect how the window appears. For example, it might be desirable to make the clock appear semi-transparent, which allows the clock to float above other windows. SWT's Shell
has a number of these options that can be set.
- Modify the instantiation of the
Shell
inside thewidgetSelected
method in theActivator
inner class to addSWT.NO_TRIM
(noclose/minimise/maximise widgets
) andSWT.ON_TOP
(floating on top of other windows):shell = new Shell(trayItem.getDisplay(), SWT.NO_TRIM | SWT.ON_TOP);
- Set the
alpha
value as128
, which is semi-transparent:shell.setAlpha(128);
- Run the target Eclipse instance, and click on the
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.