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 Duallist"
(Created page with "==Introduction== File:Duallist.jpg This widget allows the user to select one or many elements, and order them. ==Usage== The usage is pretty simple, because the API i...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Nebula|< Back to Nebula Main Page]] | ||
+ | |||
==Introduction== | ==Introduction== | ||
Line 7: | Line 9: | ||
==Usage== | ==Usage== | ||
− | The usage is pretty simple, because the API is very similar to the '''List''' API. You can easily add or remove one or many elements, select one or many elements, clear the widget or add selection listener(s). | + | The usage is pretty simple, because the API is very similar to the SWT '''List''' API. You can easily add or remove one or many elements, select one or many elements, clear the widget or add selection listener(s). |
The widget displays '''DLItems''' | The widget displays '''DLItems''' | ||
+ | |||
+ | __TOC__ | ||
==DLItem== | ==DLItem== | ||
Line 19: | Line 23: | ||
* A foreground color | * A foreground color | ||
* Data | * Data | ||
+ | |||
+ | To initialize the widget you can : | ||
+ | * Set the list of items then call a "select" method | ||
+ | * Set the list of items. The selected items are flagged with the method "setSelected" | ||
+ | |||
+ | ==Configuration== | ||
+ | |||
+ | DualList is highly configurable. You have to instantiate a **DLConfiguration** and inject it in your widget with the method "setConfiguration". | ||
+ | One can change background or foreground color of a panel, define background color for odd lines, change button icons, ... | ||
+ | For further information, looke at the [https://github.com/eclipse/nebula/blob/master/widgets/opal/duallist/org.eclipse.nebula.widgets.opal.duallist.snippets/src/org/eclipse/nebula/widgets/opal/duallist/snippets/DualListTextSnippet.java DualListTextSnippet.java] snippet. | ||
==Example== | ==Example== | ||
Line 25: | Line 39: | ||
These examples are also available here: | These examples are also available here: | ||
− | * https:// | + | * [https://github.com/eclipse/nebula/blob/master/widgets/opal/duallist/org.eclipse.nebula.widgets.opal.duallist.snippets/src/org/eclipse/nebula/widgets/opal/duallist/snippets/DualListSnippet.java DualListSnippet.java] |
− | * https:// | + | |
+ | * [https://github.com/eclipse/nebula/blob/master/widgets/opal/duallist/org.eclipse.nebula.widgets.opal.duallist.snippets/src/org/eclipse/nebula/widgets/opal/duallist/snippets/DualListTextSnippet.java DualListTextSnippet.java] |
Latest revision as of 09:17, 12 June 2021
Introduction
This widget allows the user to select one or many elements, and order them.
Usage
The usage is pretty simple, because the API is very similar to the SWT List API. You can easily add or remove one or many elements, select one or many elements, clear the widget or add selection listener(s).
The widget displays DLItems
DLItem
A DLItem is a POJO where you can get/set
- A text
- An image
- A background color
- A foreground color
- Data
To initialize the widget you can :
- Set the list of items then call a "select" method
- Set the list of items. The selected items are flagged with the method "setSelected"
Configuration
DualList is highly configurable. You have to instantiate a **DLConfiguration** and inject it in your widget with the method "setConfiguration". One can change background or foreground color of a panel, define background color for odd lines, change button icons, ... For further information, looke at the DualListTextSnippet.java snippet.
Example
Examples are available in the plug-in org.eclipse.nebula.widgets.opal.duallist.snippets.
These examples are also available here: