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

Nebula Calculator

< Back to Nebula Main Page

Introduction

Calculator.png


CalculatorCombo.png

A simple calculator, displayed as a whole widget or inside a combo.

Usage

This is very simple : you instantiate a Calculator or a CalculatorCombo, then you attach a ModifyListener in order to be informed when the value changed :

final Calculator calc = new Calculator(shell, SWT.NONE);

calc.addModifyListener(new ModifyListener() {

 @Override
 public void modifyText(final ModifyEvent e) {
          System.out.println("New value is " + calc.getValue());
 }
});

And voilà !

Examples

2 examples called CalculatorSnippet.java and CalculatorComboSnippet.java are located in the plugin org.eclipse.nebula.widgets.opal.calculator.snippets.

These examples are also available here :

Back to the top