public class NumericHelper extends Object
Control
that has a
TextField
as text input. The TextField consumes only numeric inputs. A numeric property
is associated with this TextField and will be updated upon the user's pressing ENTER or the
Control's lossing focus. If the input (even before pressing ENTER) does not match the scientific
or percentage format, the Control will be highlighted.Constructor and Description |
---|
NumericHelper(TextField editor,
Control control,
boolean intOnly,
HashMap<String,Double> kwMap)
Constructs an
NumericHelper . |
Modifier and Type | Method and Description |
---|---|
<any> |
getIsPercentageProperty()
Retrieves the boolean property denoting whether this numeric value is a percentage.
|
double |
getMax() |
double |
getMin() |
<any> |
getNumberProperty()
Retrieves the numeric property associated with this text field.
|
void |
setIntOnly(boolean intOnly) |
void |
setKwMap(HashMap<String,Double> kwMap) |
void |
setMax(double max) |
void |
setMin(double min) |
public NumericHelper(TextField editor, Control control, boolean intOnly, HashMap<String,Double> kwMap)
NumericHelper
.editor
- the text field to harvest inputcontrol
- the control to bind tointOnly
- true
if accepts integer onlykwMap
- the map between string keywords and corresponding numeric valuespublic void setMin(double min)
min
- the min to setpublic double getMin()
public double getMax()
public void setMax(double max)
max
- the max to setpublic void setIntOnly(boolean intOnly)
intOnly
- false if this NumericHelper is allowed to consume doubles.public <any> getNumberProperty()
public <any> getIsPercentageProperty()
Copyright © 2015–2022 FLIMLib. All rights reserved.