com.jgoodies.binding.value
Class ConverterFactory.StringConverter

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.StringConverter
All Implemented Interfaces:
Observable, ValueModel
Enclosing class:
ConverterFactory

public static final class ConverterFactory.StringConverter
extends AbstractConverter

Converts Values to Strings and vice-versa using a given Format.


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)
          Formats the subject value and returns a String representation.
 void setValue(java.lang.Object value)
          Parses the given String encoding and sets it as the subject's 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)
Formats the subject value and returns a String representation.

Specified by:
convertFromSubject in class AbstractConverter
Parameters:
subjectValue - the subject's value
Returns:
the formatted subjectValue

setValue

public void setValue(java.lang.Object value)
Parses the given String encoding and sets it as the subject's new value. Silently catches ParseException.

Parameters:
value - the value to be converted and set as new subject value


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