- java.lang.Object
-
- org.tentackle.fx.translate.AbstractValueTranslator<M,java.lang.String>
-
- org.tentackle.fx.translate.ValueStringTranslator<M>
-
- Type Parameters:
M- the model's type
- All Implemented Interfaces:
ValueTranslator<M,java.lang.String>
- Direct Known Subclasses:
DateStringTranslator,LocalDateStringConverter,LocalDateTimeStringConverter,LocalTimeStringConverter,NumberStringTranslator
public abstract class ValueStringTranslator<M> extends AbstractValueTranslator<M,java.lang.String>
A value translator for text components.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ValueStringTranslator(FxTextComponent component)Creates the translator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FxTextComponentgetComponent()Gets the component.java.lang.StringgetValidChars()Gets the valid input characters.MtoModel(java.lang.String text)Converts a view value to a model value.-
Methods inherited from class org.tentackle.fx.translate.AbstractValueTranslator
isLenient, setLenient
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.tentackle.fx.ValueTranslator
bindingPropertiesUpdated, needsToModelTwice, toModelFunction, toView, toViewFunction
-
-
-
-
Constructor Detail
-
ValueStringTranslator
public ValueStringTranslator(FxTextComponent component)
Creates the translator.- Parameters:
component- the text component
-
-
Method Detail
-
getComponent
public FxTextComponent getComponent()
Description copied from interface:ValueTranslatorGets the component.- Specified by:
getComponentin interfaceValueTranslator<M,java.lang.String>- Overrides:
getComponentin classAbstractValueTranslator<M,java.lang.String>- Returns:
- the component
-
toModel
public M toModel(java.lang.String text)
Description copied from interface:ValueTranslatorConverts a view value to a model value.- Parameters:
text- the view's value- Returns:
- the model's value
-
getValidChars
public java.lang.String getValidChars()
Gets the valid input characters.- Returns:
- the valid input chars, null if unlimited
-
-