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

    Modifier and Type
    Method
    Description
    Returns current (ordered) set of style class names associated with this state.
    com.vaadin.flow.component.Component
    Returns current icon of the button.
    Returns current text of the button.
    Returns current (ordered) set of theme names associated with this state.
    Set<com.vaadin.flow.component.button.ButtonVariant>
    Returns current (ordered) set of theme variants associated with this state.
    of(com.vaadin.flow.component.button.Button button)
    Converts a Button into information about its state.
  • Method Details

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