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.RegistrationaddThemeChangeListener(com.vaadin.flow.component.ComponentEventListener<ThemeToggle.ThemeToggleThemeChangedEvent> listener) com.vaadin.flow.component.ComponentgetIcon()Gets the component that is defined as the icon of this button.booleanGet the state for the autofocus property of the button.voidsetAutofocus(boolean autofocus) Set the button to be input focused when the page loads.voidsetIcon(com.vaadin.flow.component.Component icon) Sets the given component as the icon of this button.voidsetStorageKey(String storageKey) voidSets 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, setVisibleVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden com.vaadin.flow.component.AttachNotifier
addAttachListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.BlurNotifier
addBlurListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.DetachNotifier
addDetachListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexVon Schnittstelle geerbte Methoden com.vaadin.flow.component.FocusNotifier
addFocusListenerVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasElement
getElementVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledVon 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, setWidthFullVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasText
getText, getWhiteSpace, setWhiteSpaceVon Schnittstelle geerbte Methoden com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameVon Schnittstelle geerbte Methoden io.jmix.flowui.kit.component.HasTitle
getTitle, setTitleVon 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=iconattribute based on whether this button contains only an icon after this operation or not.- Angegeben von:
setTextin Schnittstellecom.vaadin.flow.component.HasText- Parameter:
text- the text content to set, may benullto 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
nullif 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
IconandImage.This method also sets or removes this button's
theme=iconattribute based on whether this button contains only an icon after this operation or not.- Parameter:
icon- component to be used as an icon, may benullto 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
autofocusproperty 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)
-