drawerToggle
A toggle component that controls the visibility a menu drawer.
-
XML element:
drawerToggle
-
Java class:
DrawerToggle
Basics
The drawerToggle
component creates a toggle button that controls the opening and closing of the drawerLayout
containing main menu items.
To ensure users can access the main menu across the application, drawerToggle
is usually placed within the navigationBar
component of the main application view.
Theme Variants
Use the themeNames attribute to customize component’s color and size.
Attributes
id - alignSelf - ariaLabel - ariaLabelledBy - autofocus - classNames - clickShortcut - colspan - css - focusShortcut - height - maxHeight - maxWidth - minHeight - minWidth - tabIndex - themeNames - visible - width
Handlers
Чтобы сгенерировать заглушку обработчика в Jmix Studio, используйте вкладку Handlers панели инспектора Jmix UI, или команду Generate Handler, доступную на верхней панели контроллера экрана и через меню Code → Generate (Alt+Insert / Cmd+N). |
ClickEvent
The com.vaadin.flow.component.ClickEvent
is fired when the component is clicked. This handler must specify one of the following three subjects to detect the number of clicks related to the event.
-
click – fires the event whenever the component is clicked.
-
singleClick – fires the event after a timeout to ensure it is not a double click.
-
doubleClick – fires the event when the component is double-clicked.