com.jgoodies.binding.value
Class ConverterFactory.StringConverter

java.lang.Object
  extended by com.jgoodies.binding.value.ConverterFactory.StringConverter
All Implemented Interfaces:
BindingConverter
Enclosing class:
ConverterFactory

public static final class ConverterFactory.StringConverter
extends Object
implements BindingConverter

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


Method Summary
 Object sourceValue(Object targetValue)
          Parses the given String encoding and sets it as the subject's new value.
 Object targetValue(Object sourceValue)
          Formats the source value and returns a String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

targetValue

public Object targetValue(Object sourceValue)
Formats the source value and returns a String representation.

Specified by:
targetValue in interface BindingConverter
Parameters:
sourceValue - the source value
Returns:
the formatted sourceValue

sourceValue

public Object sourceValue(Object targetValue)
Parses the given String encoding and sets it as the subject's new value. Silently catches ParseException.

Specified by:
sourceValue in interface BindingConverter
Parameters:
targetValue - the value to be converted and set as new subject value
Returns:
the converted value


Copyright © 2002-2013 JGoodies Software GmbH. All Rights Reserved.