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.
Difference between revisions of "Nebula Calculator"
(Created page with "< Back to Nebula Main Page =Introduction= File:Calculator.png File:CalculatorCombo.png A simple calculator, displayed as a whole widget or inside a com...") |
(No difference)
|
Revision as of 16:11, 23 February 2018
Introduction
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 :