Class SimpleIntegerModel

  extended by de.matthiasmann.twl.model.HasCallback
      extended by de.matthiasmann.twl.model.SimpleIntegerModel
All Implemented Interfaces:
IntegerModel, WithRunnableCallback

public class SimpleIntegerModel
extends HasCallback
implements IntegerModel

A simple integer model. The value is not checked against the min/max values

Constructor Summary
SimpleIntegerModel(int minValue, int maxValue, int value)
          Creates a new integer model with the specified min/max and initial value
Method Summary
 int getMaxValue()
 int getMinValue()
 int getValue()
 void setValue(int 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


public SimpleIntegerModel(int minValue,
                          int maxValue,
                          int value)
Creates a new integer model with the specified min/max and initial value

minValue - the minimum allowed value
maxValue - the maximum allowed value
value - the initial value
Method Detail


public int getMaxValue()
Specified by:
getMaxValue in interface IntegerModel


public int getMinValue()
Specified by:
getMinValue in interface IntegerModel


public int getValue()
Specified by:
getValue in interface IntegerModel


public void setValue(int value)
Specified by:
setValue in interface IntegerModel