com.vaadin.flow.component.button.

Class GeneratedVaadinButton<R extends GeneratedVaadinButton<R>>

  • All Implemented Interfaces:

    AttachNotifier, BlurNotifier<R>, ClickNotifier<R>, DetachNotifier, Focusable<R>, FocusNotifier<R>, HasElement, HasEnabled, HasStyle, HasText, Serializable

    Direct Known Subclasses:

    Button


    @Generated(value={"Generator: com.vaadin.generator.ComponentGenerator#1.0-SNAPSHOT","WebComponent: Vaadin.ButtonElement#2.0.1","Flow#1.0-SNAPSHOT"})
     @Tag(value="vaadin-button")
     @HtmlImport(value="frontend://bower_components/vaadin-button/src/vaadin-button.html")
    public abstract class GeneratedVaadinButton<R extends GeneratedVaadinButton<R>>
    extends Component
    implements HasStyle, ClickNotifier<R>, HasText, Focusable<R>

    Description copied from corresponding location in WebComponent:

    <vaadin-button> is a Polymer 2 element providing an accessible and customizable button.

    <vaadin-button> </vaadin-button>

    Styling

    The following shadow DOM parts are exposed for styling:

    Part name Description
    label The label (text) inside the button
    prefix A slot for e.g. an icon before the label
    suffix A slot for e.g. an icon after the label

    The following attributes are exposed for styling:

    Attribute Description
    active Set when the button is pressed down, either with mouse, touch or the keyboard.
    disabled Set when the button is disabled.
    focus-ring Set when the button is focused using the keyboard.
    focused Set when the button is focused.

    See ThemableMixin ? how to apply styles for shadow parts

    See Also:

    Serialized Form

    • Constructor Detail

      • GeneratedVaadinButton

        public GeneratedVaadinButton(String text)

        Sets the given string as the content of this component.

        Parameters:

        text - the text content to set

        See Also:

        HasText.setText(String)

      • GeneratedVaadinButton

        public GeneratedVaadinButton()

        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

      • remove

        protected void remove(Component... components)

        Removes the given child components from this component.

        Parameters:

        components - The components to remove.

        Throws:

        IllegalArgumentException - if any of the components is not a child of this component.

      • removeAll

        protected void removeAll()

        Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using the Element API.