Class GeneratedVaadinNumberField<R extends GeneratedVaadinNumberField<R,​T>,​T>

    • Constructor Detail

      • GeneratedVaadinNumberField

        public GeneratedVaadinNumberField​(T initialValue,
                                          T defaultValue,
                                          Class<P> elementPropertyType,
                                          SerializableFunction<P,​T> presentationToModel,
                                          SerializableFunction<T,​P> modelToPresentation,
                                          boolean isInitialValueOptional)
        Constructs a new GeneratedVaadinNumberField component with the given arguments.

        If isInitialValueOptional is true then the initial value is used only if element has no "value" property value, otherwise element "value" property is ignored and the initial value is set.

        Type Parameters:
        P - the property type
        Parameters:
        initialValue - the initial value to set to the value
        defaultValue - the default value to use if the value isn't defined
        elementPropertyType - the type of the element property
        presentationToModel - a function that converts a string value to a model value
        modelToPresentation - a function that converts a model value to a string value
        isInitialValueOptional - if isInitialValueOptional is true then the initial value is used only if element has no "value" property value, otherwise element "value" property is ignored and the initial value is set
      • GeneratedVaadinNumberField

        public GeneratedVaadinNumberField​(T initialValue,
                                          T defaultValue,
                                          Class<P> elementPropertyType,
                                          SerializableFunction<P,​T> presentationToModel,
                                          SerializableFunction<T,​P> modelToPresentation)
        Constructs a new GeneratedVaadinNumberField component with the given arguments.
        Type Parameters:
        P - the property type
        Parameters:
        initialValue - the initial value to set to the value
        defaultValue - the default value to use if the value isn't defined
        elementPropertyType - the type of the element property
        presentationToModel - a function that converts a string value to a model value
        modelToPresentation - a function that converts a model value to a string value
      • GeneratedVaadinNumberField

        public GeneratedVaadinNumberField​(T initialValue,
                                          T defaultValue,
                                          boolean acceptNullValues)
        Constructs a new GeneratedVaadinNumberField component with the given arguments.
        Parameters:
        initialValue - the initial value to set to the value
        defaultValue - the default value to use if the value isn't defined
        acceptNullValues - whether null is accepted as a model value
      • GeneratedVaadinNumberField

        public GeneratedVaadinNumberField​(T initialValue,
                                          T defaultValue,
                                          Class<P> elementPropertyType,
                                          SerializableBiFunction<R,​P,​T> presentationToModel,
                                          SerializableBiFunction<R,​T,​P> modelToPresentation)
        Constructs a new GeneratedVaadinNumberField component with the given arguments.
        Type Parameters:
        P - the property type
        Parameters:
        initialValue - the initial value to set to the value
        defaultValue - the default value to use if the value isn't defined
        elementPropertyType - the type of the element property
        presentationToModel - a function that accepts this component and a property value and returns a model value
        modelToPresentation - a function that accepts this component and a model value and returns a property value
      • GeneratedVaadinNumberField

        public GeneratedVaadinNumberField()
        Default constructor.
    • Method Detail

      • hasControlsBoolean

        protected boolean hasControlsBoolean()

        Description copied from corresponding location in WebComponent:

        Set to true to display value increase/decrease controls.

        This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.

        Returns:
        the hasControls property from the webcomponent
      • setHasControls

        protected void setHasControls​(boolean hasControls)

        Description copied from corresponding location in WebComponent:

        Set to true to display value increase/decrease controls.

        Parameters:
        hasControls - the boolean value to set
      • getMinDouble

        protected double getMinDouble()

        Description copied from corresponding location in WebComponent:

        The minimum value of the field.

        This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.

        Returns:
        the min property from the webcomponent
      • setMin

        protected void setMin​(double min)

        Description copied from corresponding location in WebComponent:

        The minimum value of the field.

        Parameters:
        min - the double value to set
      • getMaxDouble

        protected double getMaxDouble()

        Description copied from corresponding location in WebComponent:

        The maximum value of the field.

        This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.

        Returns:
        the max property from the webcomponent
      • setMax

        protected void setMax​(double max)

        Description copied from corresponding location in WebComponent:

        The maximum value of the field.

        Parameters:
        max - the double value to set
      • getStepDouble

        protected double getStepDouble()

        Description copied from corresponding location in WebComponent:

        Specifies the allowed number intervals of the field.

        This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.

        Returns:
        the step property from the webcomponent
      • setStep

        protected void setStep​(double step)

        Description copied from corresponding location in WebComponent:

        Specifies the allowed number intervals of the field.

        Parameters:
        step - the double value to set
      • checkValidity

        protected void checkValidity()
        Description copied from class: GeneratedVaadinTextField

        Description copied from corresponding location in WebComponent:

        Returns true if the current input value satisfies all constraints (if any)

        This function is not supported by Flow because it returns a boolean. Functions with return types different than void are not supported at this moment.

        Overrides:
        checkValidity in class GeneratedVaadinTextField<R extends GeneratedVaadinNumberField<R,​T>,​T>