1 package tim.prune.function;
4 import tim.prune.GenericFunction;
7 * Abstract superclass of Functions which just take a
8 * single numeric parameter
10 public abstract class SingleNumericParameterFunction extends GenericFunction
12 /** Minimum and maximum allowed values */
13 protected int _minAllowedValue, _maxAllowedValue;
16 public SingleNumericParameterFunction(App inApp, int inMinValue, int inMaxValue)
19 _minAllowedValue = inMinValue;
20 _maxAllowedValue = inMaxValue;
23 /** Get the current value for display in the dialog */
24 public abstract int getCurrentParamValue();
26 /** Get the key for the description label */
27 public abstract String getDescriptionKey();
29 /** Callback to trigger the rest of the function once the parameter has been chosen */
30 public abstract void completeFunction(int inParam);
32 /** @return minimum allowed value */
33 public int getMinAllowedValue() {return _minAllowedValue;}
34 /** @return maximum allowed value */
35 public int getMaxAllowedValue() {return _maxAllowedValue;}