public class RangedValueListener extends java.lang.Object implements ValueListener
Constructor and Description |
---|
RangedValueListener(int range,
ValueListener listener)
Creates a RangedValueListener with the specified range and listener
|
Modifier and Type | Method and Description |
---|---|
int |
getInitialValue()
Get the the inital value
|
ValueListener |
getListener()
Get the listener triggered
|
int |
getRange()
Get the range
|
void |
notifyUpdate(ValueChangeEvent evt)
Notify the update only if the new value is exceeding the range of
the initial value
|
void |
setInitialValue(int initialValue)
Reset the initial value
|
public RangedValueListener(int range, ValueListener listener)
range
- the range to be exceededlistener
- the listener to be triggeredpublic ValueListener getListener()
public int getRange()
public int getInitialValue()
public void setInitialValue(int initialValue)
initialValue
- the initial value to be setpublic void notifyUpdate(ValueChangeEvent evt)
notifyUpdate
in interface ValueListener
evt
- the pojo holding event values