Interface ButtonState

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    SimpleButtonState

    public interface ButtonState
    extends Serializable
    Encapsulation of a state of a button (text, icon, style names, etc.).
    Since:
    2020-07-07
    Author:
    miki
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Set<String> getClassNames()
      Returns current (ordered) set of style class names associated with this state.
      com.vaadin.flow.component.Component getIcon()
      Returns current icon of the button.
      String getText()
      Returns current text of the button.
      Set<String> getThemeNames()
      Returns current (ordered) set of theme names associated with this state.
      Set<com.vaadin.flow.component.button.ButtonVariant> getThemeVariants()
      Returns current (ordered) set of theme variants associated with this state.
      static ButtonState of​(com.vaadin.flow.component.button.Button button)
      Converts a Button into information about its state.
    • Method Detail

      • getText

        String getText()
        Returns current text of the button.
        Returns:
        Text.
      • getIcon

        com.vaadin.flow.component.Component getIcon()
        Returns current icon of the button.
        Returns:
        Icon.
      • getClassNames

        Set<String> getClassNames()
        Returns current (ordered) set of style class names associated with this state.
        Returns:
        An ordered set of style class names. Changes to the returned object affect this object.
      • getThemeNames

        Set<String> getThemeNames()
        Returns current (ordered) set of theme names associated with this state.
        Returns:
        An ordered set of theme names. Changes to the returned object affect this object.
      • getThemeVariants

        Set<com.vaadin.flow.component.button.ButtonVariant> getThemeVariants()
        Returns current (ordered) set of theme variants associated with this state.
        Returns:
        An ordered set of theme variants. Changes to the returned object affect this object.
      • of

        static ButtonState of​(com.vaadin.flow.component.button.Button button)
        Converts a Button into information about its state.
        Parameters:
        button - Button to get state from.
        Returns:
        A ButtonState.