FloatControlpublic abstract class FloatControl extends Control
Fields Summary |
---|
private float | value | private float | maximum | private float | minimum | private String | units | private String | minLabel | private String | midLabel | private String | maxLabel | private float | precision | private int | updatePeriod |
Constructors Summary |
---|
protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)
super(type);
this.maximum = maximum;
this.maxLabel = maxLabel;
this.midLabel = midLabel;
this.minLabel = minLabel;
this.minimum = minimum;
this.precision = precision;
this.units = units;
this.updatePeriod = updatePeriod;
this.value = initialValue;
| protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)
this(type, minimum, maximum, precision, updatePeriod, initialValue,
units, "", "", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
Methods Summary |
---|
public java.lang.String | getMaxLabel()
return this.maxLabel;
| public float | getMaximum()
return this.maximum;
| public java.lang.String | getMidLabel()
return this.midLabel;
| public java.lang.String | getMinLabel()
return this.minLabel;
| public float | getMinimum()
return this.minimum;
| public float | getPrecision()
return this.precision;
| public java.lang.String | getUnits()
return this.units;
| public int | getUpdatePeriod()
return this.updatePeriod;
| public float | getValue()
return this.value;
| public void | setValue(float newValue)
if (newValue > maximum || newValue < minimum) {
// sound.0F=value does not fall within the allowable range
throw new IllegalArgumentException(Messages.getString("sound.0F")); //$NON-NLS-1$
}
this.value = newValue;
| public void | shift(float from, float to, int microseconds)
setValue(to);
| public java.lang.String | toString()
return getType() + " with current value: "+ value + " " + units //$NON-NLS-1$ //$NON-NLS-2$
+ " (range: " + minimum + " - " + maximum + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
|