Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Nebula RoundedToolbar

Revision as of 12:57, 14 February 2018 by Unnamed Poltroon (Talk) (Created page with "==Introduction== File:RoundedToolbar.png A simple rounded toolbar with grey buttons. ==Usage== This is very simple : you instantiate a <code>RoundedToolbar</code> and...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.NONE);
RoundedToolItem item = new RoundedToolItem(roundedToolBar);
item.setTooltipText("Simple item");
item.setSelectionImage(iconBubble1w);
item.setImage(iconBubble1b);
item.setWidth(40);

And voilà !

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 : 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

Back to the top