com.jgoodies.binding.value
Class ConverterFactory.BooleanToStringConverter
- ConverterFactory
- Observable, Serializable, ValueModel
public static final class ConverterFactory.BooleanToStringConverter
Converts Booleans to Strings and vice-versa using given texts for
true, false, and null. Throws a ClassCastException if the value
to convert is not a Boolean, or not a String for the reverse conversion.
Object | convertFromSubject(Object subjectValue) - Converts the subject value to associated text representation.
|
void | setValue(Object newValue) - Converts the given String and sets the associated Boolean as
the subject's new value.
|
addValueChangeListener , booleanValue , doubleValue , fireValueChange , fireValueChange , fireValueChange , fireValueChange , fireValueChange , fireValueChange , fireValueChange , floatValue , getString , intValue , longValue , removeValueChangeListener , setValue , setValue , setValue , setValue , setValue , toString |
addPropertyChangeListener , addPropertyChangeListener , addVetoableChangeListener , addVetoableChangeListener , equals , fireMultiplePropertiesChanged , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , fireVetoableChange , fireVetoableChange , fireVetoableChange , fireVetoableChange , fireVetoableChange , fireVetoableChange , fireVetoableChange , getPropertyChangeListeners , getPropertyChangeListeners , getVetoableChangeListeners , getVetoableChangeListeners , removePropertyChangeListener , removePropertyChangeListener , removeVetoableChangeListener , removeVetoableChangeListener |
convertFromSubject
public Object convertFromSubject(Object subjectValue)
Converts the subject value to associated text representation.
Rejects non-Boolean values.
- convertFromSubject in interface AbstractConverter
subjectValue
- the subject's new value
- the text that represents the subject value
setValue
public void setValue(Object newValue)
Converts the given String and sets the associated Boolean as
the subject's new value. In case the new value equals neither
this class' trueText, nor the falseText, nor the nullText,
an IllegalArgumentException is thrown.
- setValue in interface ValueModel
newValue
- the value to be converted and set as new subject value
Copyright © 2002-2007 JGoodies Karsten Lentzsch. All Rights Reserved.