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

    • Constructor Detail

      • GeneratedVaadinCheckbox

        public GeneratedVaadinCheckbox​(T initialValue,
                                       T defaultValue,
                                       Class<P> elementPropertyType,
                                       SerializableFunction<P,​T> presentationToModel,
                                       SerializableFunction<T,​P> modelToPresentation)
        Constructs a new GeneratedVaadinCheckbox 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
      • GeneratedVaadinCheckbox

        public GeneratedVaadinCheckbox​(T initialValue,
                                       T defaultValue,
                                       boolean acceptNullValues,
                                       boolean isInitialValueOptional)
        Constructs a new GeneratedVaadinCheckbox component with the given arguments.

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

        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
        isInitialValueOptional - if isInitialValueOptional is true then the initial value is used only if element has no "checked" property value, otherwise element "checked" property is ignored and the initial value is set
      • GeneratedVaadinCheckbox

        public GeneratedVaadinCheckbox​(T initialValue,
                                       T defaultValue,
                                       boolean acceptNullValues)
        Constructs a new GeneratedVaadinCheckbox component with the given arguments.

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

        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
      • GeneratedVaadinCheckbox

        public GeneratedVaadinCheckbox​(T initialValue,
                                       T defaultValue,
                                       Class<P> elementPropertyType,
                                       SerializableBiFunction<R,​P,​T> presentationToModel,
                                       SerializableBiFunction<R,​T,​P> modelToPresentation)
        Constructs a new GeneratedVaadinCheckbox 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
      • GeneratedVaadinCheckbox

        public GeneratedVaadinCheckbox()
        Default constructor.
    • Method Detail

      • isAutofocusBoolean

        protected boolean isAutofocusBoolean()

        Description copied from corresponding location in WebComponent:

        Specify that this control should have input focus when the page loads.

        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 autofocus property from the webcomponent
      • setAutofocus

        protected void setAutofocus​(boolean autofocus)

        Description copied from corresponding location in WebComponent:

        Specify that this control should have input focus when the page loads.

        Parameters:
        autofocus - the boolean value to set
      • isDisabledBoolean

        protected boolean isDisabledBoolean()

        Description copied from corresponding location in WebComponent:

        If true, the user cannot interact with this element.

        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 disabled property from the webcomponent
      • setDisabled

        protected void setDisabled​(boolean disabled)

        Description copied from corresponding location in WebComponent:

        If true, the user cannot interact with this element.

        Parameters:
        disabled - the boolean value to set
      • getNameString

        protected String getNameString()
        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 name property from the webcomponent
      • setName

        protected void setName​(String name)
        Parameters:
        name - the String value to set
      • isIndeterminateBoolean

        @Synchronize(property="indeterminate",
                     value="indeterminate-changed")
        protected boolean isIndeterminateBoolean()

        Description copied from corresponding location in WebComponent:

        Indeterminate state of the checkbox when it's neither checked nor unchecked, but undetermined. https://developer.mozilla.org/en-US/docs/Web/ HTML/Element/input/checkbox#Indeterminate_state_checkboxes

        This property is synchronized automatically from client side when a 'indeterminate-changed' event happens.

        Returns:
        the indeterminate property from the webcomponent
      • setIndeterminate

        protected void setIndeterminate​(boolean indeterminate)

        Description copied from corresponding location in WebComponent:

        Indeterminate state of the checkbox when it's neither checked nor unchecked, but undetermined. https://developer.mozilla.org/en-US/docs/Web/ HTML/Element/input/checkbox#Indeterminate_state_checkboxes

        Parameters:
        indeterminate - the boolean value to set