Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Nebula RoundedToolbar"

Line 1: Line 1:
 +
[[Nebula|< Back to Nebula Main Page]]
 +
 
==Introduction==
 
==Introduction==
  
Line 29: Line 31:
 
An example called RoundedToolbarSnippet.java is located in the plugin org.eclipse.nebula.widgets.opal.roundedtoolbar.snippets.
 
An example called RoundedToolbarSnippet.java is located in the plugin org.eclipse.nebula.widgets.opal.roundedtoolbar.snippets.
  
This example is also available here : https://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/widgets/opal/roundedtoolbar/org.eclipse.nebula.widgets.opal.roundedtoolbar.snippets/src/org/eclipse/nebula/widgets/opal/roundedtoolbar/snippets/RoundedToolbarSnippet.java
+
This example is also available here : [https://git.eclipse.org/c/nebula/org.eclipse.nebula.git/tree/widgets/opal/roundedtoolbar/org.eclipse.nebula.widgets.opal.roundedtoolbar.snippets/src/org/eclipse/nebula/widgets/opal/roundedtoolbar/snippets/RoundedToolbarSnippet.java RoundedToolbarSnippet.java]

Revision as of 06:52, 21 February 2018

< Back to Nebula Main Page

Introduction

RoundedToolbar.png

A simple rounded toolbar with grey buttons.

Usage

This is very simple : you instantiate a RoundedToolbar and then you create RoundedToolItems (like the Toolbar widget):

final RoundedToolbar roundedToolBar = new RoundedToolbar(shell, SWT.PUSH);
RoundedToolItem item = new RoundedToolItem(roundedToolBar);
item.setTooltipText("Simple item");
item.setSelectionImage(iconBubble1w);
item.setImage(iconBubble1b);
item.setWidth(40);

And voilà !

Actually, the buttons can be PUSH BUTTON (default behaviour, SWT.PUSH), RADIO BUTTONS(SWT.RADIO) or CHECKBOX BUTTONS(SWT.CHECK).

You can customize your buttons: selection image, image when not selected or disabled, font color, size...

Examples

An example called RoundedToolbarSnippet.java is located in the plugin org.eclipse.nebula.widgets.opal.roundedtoolbar.snippets.

This example is also available here : RoundedToolbarSnippet.java

Back to the top