com.jgoodies.binding.value
Class ConverterFactory.DoubleToIntegerConverter

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.binding.value.AbstractValueModel
          extended by com.jgoodies.binding.value.AbstractConverter
              extended by com.jgoodies.binding.value.ConverterFactory.DoubleToIntegerConverter
All Implemented Interfaces:
Observable, ValueModel, Serializable
Enclosing class:
ConverterFactory

public static final class ConverterFactory.DoubleToIntegerConverter
extends AbstractConverter

Converts Doubles to Integers and vice-versa.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jgoodies.binding.value.AbstractConverter
subject
 
Fields inherited from class com.jgoodies.binding.value.AbstractValueModel
PROPERTYNAME_VALUE
 
Method Summary
 Object convertFromSubject(Object subjectValue)
          Converts the subject's value and returns a corresponding Integer value using the multiplier.
 void setValue(Object newValue)
          Converts a Double using the multiplier and sets it as new value.
 
Methods inherited from class com.jgoodies.binding.value.AbstractConverter
getValue, release
 
Methods inherited from class com.jgoodies.binding.value.AbstractValueModel
addValueChangeListener, booleanValue, doubleValue, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, fireValueChange, floatValue, getString, intValue, longValue, removeValueChangeListener, setValue, setValue, setValue, setValue, setValue, toString
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

convertFromSubject

public Object convertFromSubject(Object subjectValue)
Converts the subject's value and returns a corresponding Integer value using the multiplier.

Specified by:
convertFromSubject in class AbstractConverter
Parameters:
subjectValue - the subject's value
Returns:
the converted subjectValue
Throws:
ClassCastException - if the subject value is not of type Double

setValue

public void setValue(Object newValue)
Converts a Double using the multiplier and sets it as new value.

Parameters:
newValue - the Integer object that shall be converted
Throws:
ClassCastException - if the new value is not of type Integer


Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.