| com.jgoodies.binding.value.AbstractValueModel com.jgoodies.binding.value.ValueHolder
Constructor Summary | |
public | ValueHolder() Constructs a ValueHolder with null
as initial value. | public | ValueHolder(Object initialValue) Constructs a ValueHolder with the given initial value. | public | ValueHolder(Object initialValue, boolean checkIdentity) Constructs a ValueHolder with the given initial value. | public | ValueHolder(boolean initialValue) Constructs a ValueHolder with the specified initial
boolean value that is converted to a Boolean object. | public | ValueHolder(double initialValue) Constructs a ValueHolder with the specified initial
double value that is converted to a Double object. | public | ValueHolder(float initialValue) Constructs a ValueHolder with the specified initial
float value that is converted to a Float object. | public | ValueHolder(int initialValue) Constructs a ValueHolder with the specified initial
int value that is converted to an Integer object. | public | ValueHolder(long initialValue) Constructs a ValueHolder with the specified initial
long value that is converted to a Long object. |
Method Summary | |
public Object | getValue() Returns the observed value. | public boolean | isIdentityCheckEnabled() Answers whether this ValueHolder fires value change events if
and only if the old and new value are not the same. | public void | setIdentityCheckEnabled(boolean checkIdentity) Sets the comparison that is used to check differences between
the old and new value when firing value change events.
This is the default setting that is used when changing the value via
#setValue(Object) . | public void | setValue(Object newValue) Sets a new value. | public void | setValue(Object newValue, boolean checkIdentity) Sets a new value. |
ValueHolder | public ValueHolder()(Code) | | Constructs a ValueHolder with null
as initial value.
|
ValueHolder | public ValueHolder(Object initialValue)(Code) | | Constructs a ValueHolder with the given initial value.
By default the old and new value are compared using #equals
when firing value change events.
Parameters: initialValue - the initial value |
ValueHolder | public ValueHolder(Object initialValue, boolean checkIdentity)(Code) | | Constructs a ValueHolder with the given initial value.
Parameters: initialValue - the initial value Parameters: checkIdentity - true to compare the old and new value using== , false to use #equals |
ValueHolder | public ValueHolder(boolean initialValue)(Code) | | Constructs a ValueHolder with the specified initial
boolean value that is converted to a Boolean object.
Parameters: initialValue - the initial boolean value |
ValueHolder | public ValueHolder(double initialValue)(Code) | | Constructs a ValueHolder with the specified initial
double value that is converted to a Double object.
Parameters: initialValue - the initial double value |
ValueHolder | public ValueHolder(float initialValue)(Code) | | Constructs a ValueHolder with the specified initial
float value that is converted to a Float object.
Parameters: initialValue - the initial float value |
ValueHolder | public ValueHolder(int initialValue)(Code) | | Constructs a ValueHolder with the specified initial
int value that is converted to an Integer object.
Parameters: initialValue - the initial int value |
ValueHolder | public ValueHolder(long initialValue)(Code) | | Constructs a ValueHolder with the specified initial
long value that is converted to a Long object.
Parameters: initialValue - the initial long value |
getValue | public Object getValue()(Code) | | Returns the observed value.
the observed value |
isIdentityCheckEnabled | public boolean isIdentityCheckEnabled()(Code) | | Answers whether this ValueHolder fires value change events if
and only if the old and new value are not the same.
true if the old and new value are comparedusing == , false if the valuesare compared using #equals |
setIdentityCheckEnabled | public void setIdentityCheckEnabled(boolean checkIdentity)(Code) | | Sets the comparison that is used to check differences between
the old and new value when firing value change events.
This is the default setting that is used when changing the value via
#setValue(Object) . You can override this default setting
by changing a value via #setValue(Object, boolean) .
Parameters: checkIdentity - true to compare the old and new value using== , false to use #equals |
setValue | public void setValue(Object newValue)(Code) | | Sets a new value. Fires a value change event if the old and new
value differ. The difference is tested with == if
isIdentityCheckEnabled answers true .
The values are compared with #equals if the
identity check is disabled.
Parameters: newValue - the new value |
setValue | public void setValue(Object newValue, boolean checkIdentity)(Code) | | Sets a new value. Fires a value change event if the old and new
value differ. The difference is tested with == if
checkIdentity is true . The values are
compared with #equals if the checkIdentiy
parameter is set to false .
Unlike general bean property setters, this method does not fire
an event if the old and new value are null .
Parameters: newValue - the new value Parameters: checkIdentity - true to compare the old and new value using== , false to use #equals |
Fields inherited from com.jgoodies.binding.value.AbstractValueModel | final public static String PROPERTYNAME_VALUE(Code)(Java Doc)
|
|
|