| java.lang.Object com.jgoodies.binding.beans.Model com.jgoodies.binding.value.AbstractValueModel
All known Subclasses: com.jgoodies.binding.value.DelayedReadValueModel, com.jgoodies.binding.value.BufferedValueModel, com.jgoodies.binding.extras.NonNullValueModel, com.jgoodies.binding.value.ValueHolder, com.jgoodies.binding.tests.value.ValueHolderWithOldAndNewValueNull, com.jgoodies.binding.beans.PropertyAdapter, com.jgoodies.binding.value.ComponentValueModel, com.jgoodies.binding.tests.value.CloningValueHolder, com.jgoodies.binding.extras.DelayedWriteValueModel, com.jgoodies.binding.value.AbstractConverter, com.jgoodies.binding.adapter.PreferencesAdapter, com.jgoodies.binding.value.Trigger, com.jgoodies.binding.tests.value.ToUpperCaseStringHolder, com.jgoodies.binding.tests.value.ValueHolderWithOldValueNull, com.jgoodies.binding.tests.value.ValueHolderWithNewValueNull, com.jgoodies.binding.value.AbstractVetoableValueModel,
AbstractValueModel | abstract public class AbstractValueModel extends Model implements ValueModel(Code) | | An abstract class that minimizes the effort required to implement
the
ValueModel interface. It provides convenience methods
to convert boolean, double, float, int, and long to their
corresponding Object values and vice versa.
Subclasses must implement getValue() and
setValue(Object) to get and set this model's value.
author: Karsten Lentzsch version: $Revision: 1.6 $ See Also: com.jgoodies.binding.beans.ExtendedPropertyChangeSupport |
Method Summary | |
final public void | addValueChangeListener(PropertyChangeListener l) Registers the given PropertyChangeListener with this model.
The listener will be notified if the value has changed.
The PropertyChangeEvents delivered to the listener have the name
set to "value". | final public boolean | booleanValue() Converts this model's value and returns it as a boolean . | final public double | doubleValue() Converts this model's value and returns it as a double . | final public void | fireValueChange(Object oldValue, Object newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(Object oldValue, Object newValue, boolean checkIdentity) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(boolean oldValue, boolean newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(int oldValue, int newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(long oldValue, long newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(double oldValue, double newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public void | fireValueChange(float oldValue, float newValue) Notifies all listeners that have registered interest for
notification on this event type. | final public float | floatValue() Converts this model's value and returns it as a float . | public String | getString() Converts this model's value and returns it as a String . | final public int | intValue() Converts this model's value and returns it as an int . | final public long | longValue() Converts this model's value and returns it as a long . | final public void | removeValueChangeListener(PropertyChangeListener l) Removes the given PropertyChangeListener from the model. | final public void | setValue(boolean b) Converts the given boolean to a Boolean and
sets it as new value. | final public void | setValue(double d) Converts the given double to a Double and
sets it as new value. | final public void | setValue(float f) Converts the given float to a Float and
sets it as new value. | final public void | setValue(int i) Converts the given int to an Integer and
sets it as new value. | final public void | setValue(long l) Converts the given long to a Long and
sets it as new value. | public String | toString() Returns a string representation of this value model. |
PROPERTYNAME_VALUE | final public static String PROPERTYNAME_VALUE(Code) | | The name of the bound property value.
|
addValueChangeListener | final public void addValueChangeListener(PropertyChangeListener l)(Code) | | Registers the given PropertyChangeListener with this model.
The listener will be notified if the value has changed.
The PropertyChangeEvents delivered to the listener have the name
set to "value". In other words, the listeners won't get notified
when a PropertyChangeEvent is fired that has a null object as
the name to indicate an arbitrary set of the event source's
properties have changed.
In the rare case, where you want to notify a PropertyChangeListener
even with PropertyChangeEvents that have no property name set,
you can register the listener with #addPropertyChangeListener,
not #addValueChangeListener.
Parameters: l - the listener to add See Also: ValueModel |
booleanValue | final public boolean booleanValue()(Code) | | Converts this model's value and returns it as a boolean .
the boolean value throws: ClassCastException - if the observed value is not of typeBoolean throws: NullPointerException - if the value is null |
doubleValue | final public double doubleValue()(Code) | | Converts this model's value and returns it as a double .
the double value throws: ClassCastException - if the observed value is not of typeDouble throws: NullPointerException - if the value is null |
fireValueChange | final public void fireValueChange(Object oldValue, Object newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the value before the change Parameters: newValue - the value after the change See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(Object oldValue, Object newValue, boolean checkIdentity)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
The boolean parameter specifies whether differences between the old
and new value are tested using == or #equals .
Parameters: oldValue - the value before the change Parameters: newValue - the value after the change Parameters: checkIdentity - true to compare the old and new value using== , false to use #equals See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(boolean oldValue, boolean newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the boolean value before the change Parameters: newValue - the boolean value after the change See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(int oldValue, int newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the int value before the change Parameters: newValue - the int value after the change See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(long oldValue, long newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the long value before the change Parameters: newValue - the long value after the change See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(double oldValue, double newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the double value before the change Parameters: newValue - the double value after the change See Also: java.beans.PropertyChangeSupport |
fireValueChange | final public void fireValueChange(float oldValue, float newValue)(Code) | | Notifies all listeners that have registered interest for
notification on this event type. The event instance
is lazily created using the parameters passed into
the fire method.
Parameters: oldValue - the float value before the change Parameters: newValue - the float value after the change See Also: java.beans.PropertyChangeSupport |
floatValue | final public float floatValue()(Code) | | Converts this model's value and returns it as a float .
the float value throws: ClassCastException - if the observed value is not of typeFloat throws: NullPointerException - if the value is null |
getString | public String getString()(Code) | | Converts this model's value and returns it as a String .
this model's value as String throws: ClassCastException - if the observed value is not of typeString |
intValue | final public int intValue()(Code) | | Converts this model's value and returns it as an int .
the int value throws: ClassCastException - if the observed value is not of typeInteger throws: NullPointerException - if the value is null |
longValue | final public long longValue()(Code) | | Converts this model's value and returns it as a long .
the long value throws: ClassCastException - if the observed value is not of typeLong throws: NullPointerException - if the value is null |
removeValueChangeListener | final public void removeValueChangeListener(PropertyChangeListener l)(Code) | | Removes the given PropertyChangeListener from the model.
Parameters: l - the listener to remove |
setValue | final public void setValue(boolean b)(Code) | | Converts the given boolean to a Boolean and
sets it as new value.
Parameters: b - the value to be converted and set as new value |
setValue | final public void setValue(double d)(Code) | | Converts the given double to a Double and
sets it as new value.
Parameters: d - the value to be converted and set as new value |
setValue | final public void setValue(float f)(Code) | | Converts the given float to a Float and
sets it as new value.
Parameters: f - the value to be converted and set as new value |
setValue | final public void setValue(int i)(Code) | | Converts the given int to an Integer and
sets it as new value.
Parameters: i - the value to be converted and set as new value |
setValue | final public void setValue(long l)(Code) | | Converts the given long to a Long and
sets it as new value.
Parameters: l - the value to be converted and set as new value |
toString | public String toString()(Code) | | Returns a string representation of this value model.
Answers the print string of the observed value.
a string representation of this value model |
Methods inherited from com.jgoodies.binding.beans.Model | final public synchronized void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) final public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) final public synchronized void addVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc) final public synchronized void addVetoableChangeListener(String propertyName, VetoableChangeListener listener)(Code)(Java Doc) final protected boolean equals(Object o1, Object o2)(Code)(Java Doc) final protected void fireIndexedPropertyChange(String propertyName, int index, Object oldValue, Object newValue)(Code)(Java Doc) final protected void fireIndexedPropertyChange(String propertyName, int index, int oldValue, int newValue)(Code)(Java Doc) final protected void fireIndexedPropertyChange(String propertyName, int index, boolean oldValue, boolean newValue)(Code)(Java Doc) final protected void fireMultiplePropertiesChanged()(Code)(Java Doc) final protected void firePropertyChange(PropertyChangeEvent event)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, Object oldValue, Object newValue, boolean checkIdentity)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, double oldValue, double newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, float oldValue, float newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, int oldValue, int newValue)(Code)(Java Doc) final protected void firePropertyChange(String propertyName, long oldValue, long newValue)(Code)(Java Doc) final protected void fireVetoableChange(PropertyChangeEvent event) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, boolean oldValue, boolean newValue) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, double oldValue, double newValue) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, int oldValue, int newValue) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, float oldValue, float newValue) throws PropertyVetoException(Code)(Java Doc) final protected void fireVetoableChange(String propertyName, long oldValue, long newValue) throws PropertyVetoException(Code)(Java Doc) final public synchronized PropertyChangeListener[] getPropertyChangeListeners()(Code)(Java Doc) final public synchronized PropertyChangeListener[] getPropertyChangeListeners(String propertyName)(Code)(Java Doc) final public synchronized VetoableChangeListener[] getVetoableChangeListeners()(Code)(Java Doc) final public synchronized VetoableChangeListener[] getVetoableChangeListeners(String propertyName)(Code)(Java Doc) final public synchronized void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) final public synchronized void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) final public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)(Code)(Java Doc) final public synchronized void removeVetoableChangeListener(String propertyName, VetoableChangeListener listener)(Code)(Java Doc)
|
|
|