Klasse ThemeToggle
java.lang.Object
com.vaadin.flow.component.Component
de.bytestore.hostinger.components.themetoggle.ThemeToggle
- Alle implementierten Schnittstellen:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.BlurNotifier<ThemeToggle>
,com.vaadin.flow.component.ClickNotifier<ThemeToggle>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.Focusable<ThemeToggle>
,com.vaadin.flow.component.FocusNotifier<ThemeToggle>
,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.HasTooltip
,io.jmix.flowui.kit.component.HasTitle
,Serializable
@Tag("theme-toggle")
@JsModule("./src/component/theme-switcher/theme-toggle.js")
public class ThemeToggle
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.ClickNotifier<ThemeToggle>, com.vaadin.flow.component.Focusable<ThemeToggle>, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, com.vaadin.flow.component.shared.HasTooltip, io.jmix.flowui.kit.component.HasTitle
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon 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
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungThemeToggle
(com.vaadin.flow.component.Component icon) ThemeToggle
(String text, com.vaadin.flow.component.Component icon) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcom.vaadin.flow.shared.Registration
addThemeChangeListener
(com.vaadin.flow.component.ComponentEventListener<ThemeToggle.ThemeToggleThemeChangedEvent> listener) com.vaadin.flow.component.Component
getIcon()
Gets the component that is defined as the icon of this button.boolean
Get the state for the autofocus property of the button.void
setAutofocus
(boolean autofocus) Set the button to be input focused when the page loads.void
setIcon
(com.vaadin.flow.component.Component icon) Sets the given component as the icon of this button.void
setStorageKey
(String storageKey) void
Sets the given string as the text content of this component.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.BlurNotifier
addBlurListener
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
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
Von Schnittstelle geerbte Methoden com.vaadin.flow.component.FocusNotifier
addFocusListener
Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasElement
getElement
Von Schnittstelle geerbte Methoden com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
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.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 io.jmix.flowui.kit.component.HasTitle
getTitle, setTitle
Von Schnittstelle geerbte Methoden com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Felddetails
-
STORAGE_KEY_PROPERTY
- Siehe auch:
-
THEME_CHANGED_EVENT
- Siehe auch:
-
-
Konstruktordetails
-
ThemeToggle
public ThemeToggle() -
ThemeToggle
public ThemeToggle(com.vaadin.flow.component.Component icon) -
ThemeToggle
-
-
Methodendetails
-
setText
Sets the given string as the text content of this component.This method removes any existing text-content and replaces it with the given text.
This method also sets or removes this button's
theme=icon
attribute based on whether this button contains only an icon after this operation or not.- Angegeben von:
setText
in Schnittstellecom.vaadin.flow.component.HasText
- Parameter:
text
- the text content to set, may benull
to only remove existing text
-
getIcon
public com.vaadin.flow.component.Component getIcon()Gets the component that is defined as the icon of this button.- Gibt zurück:
- the icon of this button, or
null
if the icon is not set
-
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.Component icon) Sets the given component as the icon of this button.Even though you can use almost any component as an icon, some good options are
Icon
andImage
.This method also sets or removes this button's
theme=icon
attribute based on whether this button contains only an icon after this operation or not.- Parameter:
icon
- component to be used as an icon, may benull
to only remove the current icon, can't be a text-node
-
isAutofocus
public boolean isAutofocus()Get the state for the autofocus property of the button.This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Gibt zurück:
- the
autofocus
property from the button
-
setAutofocus
public void setAutofocus(boolean autofocus) Set the button to be input focused when the page loads.- Parameter:
autofocus
- the boolean value to set
-
getStorageKey
-
setStorageKey
-
addThemeChangeListener
public com.vaadin.flow.shared.Registration addThemeChangeListener(com.vaadin.flow.component.ComponentEventListener<ThemeToggle.ThemeToggleThemeChangedEvent> listener)
-