com.jgoodies.binding.value
Class ConverterFactory.FloatConverter

java.lang.Object
  extended by AbstractBean
      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.FloatConverter
All Implemented Interfaces:
Observable, ValueModel
Enclosing class:
ConverterFactory

public static final class ConverterFactory.FloatConverter
extends AbstractConverter

Converts Floats using a given multiplier.


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
 java.lang.Object convertFromSubject(java.lang.Object subjectValue)
          Converts the subject's value and returns a corresponding Float using the multiplier.
 void setValue(java.lang.Object newValue)
          Converts a Float 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, paramString, removeValueChangeListener, setValue, setValue, setValue, setValue, setValue, toString, valueString
 
Methods inherited from class com.jgoodies.binding.beans.Model
createPropertyChangeSupport, firePropertyChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jgoodies.binding.beans.Observable
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

convertFromSubject

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

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

setValue

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

Parameters:
newValue - the Float object that shall be converted
Throws:
java.lang.ClassCastException - if the new value is not of type Float


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