- java.lang.Object
-
- org.tentackle.fx.translate.AbstractValueTranslator<M,java.lang.String>
-
- org.tentackle.fx.translate.ValueStringTranslator<M>
-
- org.tentackle.fx.translate.NumberStringTranslator<java.lang.Byte>
-
- org.tentackle.fx.translate.ByteStringTranslator
-
- All Implemented Interfaces:
ValueTranslator<java.lang.Byte,java.lang.String>
@ValueTranslatorService(modelClass=java.lang.Byte.class, viewClass=java.lang.String.class) public class ByteStringTranslator extends NumberStringTranslator<java.lang.Byte>
Byte translator.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description ByteStringTranslator(FxTextComponent component)Creates a translator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultPattern()Gets the default pattern according to the type.java.util.function.Function<java.lang.String,java.lang.Byte>toModelFunction()Function to translate a view value to a model value.java.util.function.Function<java.lang.Byte,java.lang.String>toViewFunction()Function to translate a model value to a view value.-
Methods inherited from class org.tentackle.fx.translate.NumberStringTranslator
getFormat, getValidChars, parse
-
Methods inherited from class org.tentackle.fx.translate.ValueStringTranslator
getComponent, toModel
-
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, toView
-
-
-
-
Constructor Detail
-
ByteStringTranslator
public ByteStringTranslator(FxTextComponent component)
Creates a translator.- Parameters:
component- the text component
-
-
Method Detail
-
toViewFunction
public java.util.function.Function<java.lang.Byte,java.lang.String> toViewFunction()
Description copied from interface:ValueTranslatorFunction to translate a model value to a view value.- Returns:
- the function
-
toModelFunction
public java.util.function.Function<java.lang.String,java.lang.Byte> toModelFunction()
Description copied from interface:ValueTranslatorFunction to translate a view value to a model value.- Returns:
- the function
-
getDefaultPattern
public java.lang.String getDefaultPattern()
Description copied from class:NumberStringTranslatorGets the default pattern according to the type.- Specified by:
getDefaultPatternin classNumberStringTranslator<java.lang.Byte>- Returns:
- the pattern
-
-