public class RealSpinner
extends java.lang.Object
Wrapper for a spinner-like SWT widget which supports real numbers and helpful key commands for value manipulation
Constructor and Description |
---|
RealSpinner(org.eclipse.swt.widgets.Composite parent)
Initializes the object and adds the widget to the given parent
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Control |
getControl()
Returns the Text control widget wrapped in this RealSpinner instance
|
double |
getValue()
Returns the real input value
|
void |
listen(RealSpinnerListener listener)
Adds a RealSpinnerListener to its listeners list to be notified of
changes to the value
|
void |
setBounds(double minimum,
double maximum)
Sets the minimum and maximum bounds (inclusive)
|
void |
setValue(double value)
Replaces the value with the given number
|
public RealSpinner(org.eclipse.swt.widgets.Composite parent)
Initializes the object and adds the widget to the given parent
parent
- The parent of the new RealSpinner
public void setValue(double value)
Replaces the value with the given number
value
- The new value
public double getValue()
Returns the real input value
The value
public void setBounds(double minimum, double maximum)
Sets the minimum and maximum bounds (inclusive)
minimum
- The minimum value to enforce
maximum
- The maximum value to enforce
public void listen(RealSpinnerListener listener)
listener
- The listener to notified of changes to the valuepublic org.eclipse.swt.widgets.Control getControl()