de.matthiasmann.twl.model
Class SimpleFloatModel

java.lang.Object
  extended by de.matthiasmann.twl.model.HasCallback
      extended by de.matthiasmann.twl.model.AbstractFloatModel
          extended by de.matthiasmann.twl.model.SimpleFloatModel
All Implemented Interfaces:
FloatModel, WithRunnableCallback

public class SimpleFloatModel
extends AbstractFloatModel

A simple float data model. Out of range values are limited to minValue ... maxValue. If the value is set to NaN then it is converted to minValue.


Constructor Summary
SimpleFloatModel(float minValue, float maxValue, float value)
           
 
Method Summary
 float getMaxValue()
           
 float getMinValue()
           
 float getValue()
           
protected  float limit(float value)
           
 void setValue(float value)
           
 
Methods inherited from class de.matthiasmann.twl.model.HasCallback
addCallback, doCallback, hasCallbacks, removeCallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.matthiasmann.twl.utils.WithRunnableCallback
addCallback, removeCallback
 

Constructor Detail

SimpleFloatModel

public SimpleFloatModel(float minValue,
                        float maxValue,
                        float value)
Method Detail

getMaxValue

public float getMaxValue()

getMinValue

public float getMinValue()

getValue

public float getValue()

setValue

public void setValue(float value)

limit

protected float limit(float value)