Klasse ToolbarSwitch

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.button.Button
com.vaadin.componentfactory.toolbar.ToolbarSwitch
Alle implementierten Schnittstellen:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.button.Button>, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.button.Button>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.button.Button>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.button.Button>, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.button.ButtonVariant>, com.vaadin.flow.component.shared.HasTooltip, Serializable

public class ToolbarSwitch extends com.vaadin.flow.component.button.Button
A button for the toolbar, that provides a "switch" like functionality. Clicking it will toggle it to "active / on", allowing to represent active functionality.
Siehe auch:
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static class 
    This event is fired, when a switch's active state changes.

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Creates a new instance.
    ToolbarSwitch(com.vaadin.flow.component.Component icon)
    Creates a new instance with the given icon.
    ToolbarSwitch(com.vaadin.flow.component.Component icon, com.vaadin.flow.component.Component suffixIcon)
    Creates a new instance with the given icons.
    ToolbarSwitch(com.vaadin.flow.component.icon.VaadinIcon icon)
    Creates a new instance with the given icon.
    ToolbarSwitch(com.vaadin.flow.component.icon.VaadinIcon icon, com.vaadin.flow.component.icon.VaadinIcon suffixIcon)
    Creates a new instance with the given icons.
    Creates a new instance with the given text as its label.
    ToolbarSwitch(String text, com.vaadin.flow.component.Component icon)
    Creates a new instance with the given label text and icon.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    com.vaadin.flow.shared.Registration
    addActiveChangedListener(com.vaadin.flow.component.ComponentEventListener<ToolbarSwitch.ActiveChangedEvent> listener)
    Adds a listener, that will be notified, when this switch is activated.
    boolean
    Indicates, if this switch is active or not.
    void
    setActive(boolean active)
    Sets an explicit active state
    boolean
    Toggles the "active" state.

    Von Klasse geerbte Methoden com.vaadin.flow.component.button.Button

    addBlurListener, addFocusListener, addFocusShortcut, click, clickInClient, getIcon, isAutofocus, isDisableOnClick, isIconAfterText, remove, setAutofocus, setDisableOnClick, setEnabled, setIcon, setIconAfterText, setText

    Von Klasse geerbte Methoden com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.Focusable

    blur, focus, getTabIndex, setTabIndex

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasElement

    getElement

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasEnabled

    isEnabled

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.shared.HasPrefix

    getPrefixComponent, setPrefixComponent

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.shared.HasSuffix

    getSuffixComponent, setSuffixComponent

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasText

    getText, getWhiteSpace, setWhiteSpace

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.shared.HasThemeVariant

    addThemeVariants, removeThemeVariants

    Von Schnittstelle geerbte Methoden com.vaadin.flow.component.shared.HasTooltip

    getTooltip, setTooltipText
  • Konstruktordetails

    • ToolbarSwitch

      public ToolbarSwitch()
      Creates a new instance.
    • ToolbarSwitch

      public ToolbarSwitch(String text)
      Creates a new instance with the given text as its label.
      Parameter:
      text - label text
    • ToolbarSwitch

      public ToolbarSwitch(com.vaadin.flow.component.Component icon)
      Creates a new instance with the given icon.
      Parameter:
      icon - icon
    • ToolbarSwitch

      public ToolbarSwitch(com.vaadin.flow.component.icon.VaadinIcon icon)
      Creates a new instance with the given icon.
      Parameter:
      icon - icon
    • ToolbarSwitch

      public ToolbarSwitch(com.vaadin.flow.component.icon.VaadinIcon icon, com.vaadin.flow.component.icon.VaadinIcon suffixIcon)
      Creates a new instance with the given icons. The second icon is displayed smaller and elevated as an addition to the first icon.
      Parameter:
      icon - icon
      suffixIcon - additonal / suffix icon
    • ToolbarSwitch

      public ToolbarSwitch(com.vaadin.flow.component.Component icon, com.vaadin.flow.component.Component suffixIcon)
      Creates a new instance with the given icons. The second icon is displayed smaller and elevated as an addition to the first icon.
      Parameter:
      icon - icon
      suffixIcon - additonal / suffix icon
    • ToolbarSwitch

      public ToolbarSwitch(String text, com.vaadin.flow.component.Component icon)
      Creates a new instance with the given label text and icon.
      Parameter:
      text - label text
      icon - icon
  • Methodendetails

    • toggle

      public boolean toggle()
      Toggles the "active" state.
      Gibt zurück:
      new active state
    • setActive

      public void setActive(boolean active)
      Sets an explicit active state
      Parameter:
      active - new active state
    • isActive

      public boolean isActive()
      Indicates, if this switch is active or not.
      Gibt zurück:
      is active
    • addActiveChangedListener

      public com.vaadin.flow.shared.Registration addActiveChangedListener(com.vaadin.flow.component.ComponentEventListener<ToolbarSwitch.ActiveChangedEvent> listener)
      Adds a listener, that will be notified, when this switch is activated.
      Parameter:
      listener - listener
      Gibt zurück:
      registration to remove the listener