Interface ButtonState
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SimpleButtonState
Encapsulation of a state of a button (text, icon, style names, etc.).
- Since:
- 2020-07-07
- Author:
- miki
-
Method Summary
Modifier and TypeMethodDescriptionReturns current (ordered) set of style class names associated with this state.com.vaadin.flow.component.ComponentgetIcon()Returns current icon of the button.getText()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.static ButtonStateof(com.vaadin.flow.component.button.Button button) Converts aButtoninto 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
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
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
Converts aButtoninto information about its state.- Parameters:
button- Button to get state from.- Returns:
- A
ButtonState.
-