de.matthiasmann.twl.model
Class SimpleIntegerModel

java.lang.Object
  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

SimpleIntegerModel

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

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

getMaxValue

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

getMinValue

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

getValue

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

setValue

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