Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Nebula Panels"
(→Usage) |
|||
Line 32: | Line 32: | ||
p.show(); | p.show(); | ||
Dialog.isConfirmed("Confirmation", "Are you sure you want to save this form ?"); | Dialog.isConfirmed("Confirmation", "Are you sure you want to save this form ?"); | ||
− | + | p.hide(); | |
} | } | ||
− | + | ||
@Override | @Override | ||
public void widgetDefaultSelected(final SelectionEvent e) { | public void widgetDefaultSelected(final SelectionEvent e) { |
Latest revision as of 07:00, 19 March 2020
Introduction
Contents
These panels can be use to put focus on a particular element. The blurredPanel blurs the content of the window, the darkPanel makes the window darker.
Usage
The usage is very simple :
- You create a
DarkPanel
or aBlurredPanel
- You can change the radius value of the BlurredPanel or the alpha value of the DarkPanel
- You open the panel with the method
show
- You close the panel with the method
hide
final BlurredPanel p = new BlurredPanel(shell); ... final Button ok = new Button(shell, SWT.PUSH); ok.setText("Ok"); ... ok.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(final SelectionEvent e) { p.show(); Dialog.isConfirmed("Confirmation", "Are you sure you want to save this form ?"); p.hide(); } @Override public void widgetDefaultSelected(final SelectionEvent e) { } });
Example
2 examples called SnippetBlurredPanel and SnippetDarkPanel are located in the plugin org.eclipse.nebula.widgets.opal.panels.snippets.
These examples are also available here :