public class AppLayoutMenuItem extends Tab
| Constructor and Description |
|---|
AppLayoutMenuItem(Component icon)
Constructs a new object with the given icon.
|
AppLayoutMenuItem(Component icon,
ComponentEventListener<MenuItemClickEvent> listener)
Constructs a new object with the given icon and click listener.
|
AppLayoutMenuItem(Component icon,
String title)
Constructs a new object with the given icon and title.
|
AppLayoutMenuItem(Component icon,
String title,
ComponentEventListener<MenuItemClickEvent> listener)
Constructs a new object with the given icon, title and click listener.
|
AppLayoutMenuItem(Component icon,
String title,
String route)
Constructs a new object with the given icon, title and route.
|
AppLayoutMenuItem(String title)
Constructs a new object with the given title.
|
AppLayoutMenuItem(String title,
ComponentEventListener<MenuItemClickEvent> listener)
Constructs a new object with the given title and click listener.
|
AppLayoutMenuItem(String title,
String route)
Constructs a new object with the given title and route.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addMenuItemClickListener(ComponentEventListener<MenuItemClickEvent> listener) |
Component |
getIcon()
Returns icon
|
String |
getRoute() |
String |
getTitle()
Returns displayed AppLayoutMenuItem title
|
void |
setIcon(Component icon)
Sets icon
|
void |
setRoute(String route)
Sets the route to be navigated to when this menu item is selected.
|
void |
setTitle(String title)
Sets AppLayoutMenuItem title
|
getFlexGrow, getLabel, isEnabled, isSelected, setEnabled, setFlexGrow, setLabel, setSelected, toStringaddThemeVariants, getValueString, isDisabledBoolean, isSelectedBoolean, removeThemeVariants, setDisabled, setValueaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addComponentAsFirst, addComponentAtIndex, remove, removeAllgetElementaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameaddAttachListeneraddDetachListenerpublic AppLayoutMenuItem(String title)
title - the title to displaypublic AppLayoutMenuItem(Component icon)
icon - the icon to displaypublic AppLayoutMenuItem(Component icon, String title)
icon - the icon to displaytitle - the title to displaypublic AppLayoutMenuItem(String title, String route)
title - the title to displayroute - The route to navigate on clickpublic AppLayoutMenuItem(Component icon, String title, String route)
icon - the icon to displaytitle - the title to displayroute - the route to navigate on clickpublic AppLayoutMenuItem(Component icon, ComponentEventListener<MenuItemClickEvent> listener)
icon - the icon to displaylistener - the menu item click listenerpublic AppLayoutMenuItem(String title, ComponentEventListener<MenuItemClickEvent> listener)
title - the title to displaylistener - the menu item click listenerpublic AppLayoutMenuItem(Component icon, String title, ComponentEventListener<MenuItemClickEvent> listener)
icon - the icon to displaytitle - the title to displaylistener - the menu item click listenerpublic Component getIcon()
public void setIcon(Component icon)
icon - Icon to display in AppLayoutMenuItempublic String getTitle()
public void setTitle(String title)
title - the displayed title of AppLayoutMenuItempublic void setRoute(String route)
route - Route to be navigated topublic String getRoute()
public Registration addMenuItemClickListener(ComponentEventListener<MenuItemClickEvent> listener)
listener - listener to called when the menu item is clicked.RegistrationCopyright © 2018. All rights reserved.