Class FractionNumberStringTranslator<M extends java.lang.Number>

    • Constructor Detail

      • FractionNumberStringTranslator

        public FractionNumberStringTranslator​(FxTextComponent component)
        Creates a fraction number translator.
        Parameters:
        component - the text component
    • Method Detail

      • needsToModelTwice

        public boolean needsToModelTwice()
        Description copied from interface: ValueTranslator
        Returns whether toModel must be invoked twice.
        An example is a DoubleStringTranslator:
        let fraction number input be 1.211111 and formatting scale 2.
        • after first updateModel the model contains 1.211111
        • after formatting and updateView, the view contains 1.21 but the model still contains 1.211111
        • after second updateModel the model contains the correct value 1.21
        Returns:
        true if needs a second translation roundtrip