Class BMoneyStringTranslator
java.lang.Object
org.tentackle.fx.translate.AbstractValueTranslator<BMoney,String>
org.tentackle.fx.translate.ValueStringTranslator<BMoney>
org.tentackle.fx.translate.NumberStringTranslator<BMoney>
org.tentackle.fx.translate.FractionNumberStringTranslator<BMoney>
org.tentackle.fx.translate.BMoneyStringTranslator
- All Implemented Interfaces:
ValueTranslator<BMoney,String>
@ValueTranslatorService(modelClass=BMoney.class,
viewClass=String.class)
public class BMoneyStringTranslator
extends FractionNumberStringTranslator<BMoney>
BMoney translator.
- Author:
- harald
-
Field Summary
Fields inherited from class NumberStringTranslator
format, pattern, signedValidChars, unsignedValidChars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the default pattern according to the type.protected BMoneyParses a string to a number.Function to translate a view value to a model value.Function to translate a model value to a view value.Methods inherited from class FractionNumberStringTranslator
initializeValidChars, needsToModelTwiceMethods inherited from class NumberStringTranslator
getFormat, getValidCharsMethods inherited from class ValueStringTranslator
getComponent, toModelMethods inherited from class AbstractValueTranslator
isLenient, isMappingIncomplete, isModelModified, saveModelValue, setLenientMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ValueTranslator
bindingPropertiesUpdated, toView
-
Constructor Details
-
BMoneyStringTranslator
Creates a translator.- Parameters:
component- the text component
-
-
Method Details
-
toViewFunction
Description copied from interface:ValueTranslatorFunction to translate a model value to a view value.- Returns:
- the function
-
toModelFunction
Description copied from interface:ValueTranslatorFunction to translate a view value to a model value.- Returns:
- the function
-
getDefaultPattern
Description copied from class:NumberStringTranslatorGets the default pattern according to the type.- Specified by:
getDefaultPatternin classNumberStringTranslator<BMoney>- Returns:
- the pattern
-
parse
Description copied from class:NumberStringTranslatorParses a string to a number.- Overrides:
parsein classNumberStringTranslator<BMoney>- Parameters:
str- the string- Returns:
- the number
-