com.vaadin.flow.component.applayout.

Class AppLayoutMenuItem

    • Constructor Detail

      • AppLayoutMenuItem

        public AppLayoutMenuItem(String title)

        Constructs a new object with the given title.

        Parameters:

        title - the title to display

      • AppLayoutMenuItem

        public AppLayoutMenuItem(Component icon)

        Constructs a new object with the given icon.

        Parameters:

        icon - the icon to display

      • AppLayoutMenuItem

        public AppLayoutMenuItem(Component icon,
                                 String title)

        Constructs a new object with the given icon and title.

        Parameters:

        icon - the icon to display

        title - the title to display

      • AppLayoutMenuItem

        public AppLayoutMenuItem(String title,
                                 String route)

        Constructs a new object with the given title and route.

        Parameters:

        title - the title to display

        route - The route to navigate on click

      • AppLayoutMenuItem

        public AppLayoutMenuItem(Component icon,
                                 String title,
                                 String route)

        Constructs a new object with the given icon, title and route.

        Parameters:

        icon - the icon to display

        title - the title to display

        route - the route to navigate on click

      • AppLayoutMenuItem

        public AppLayoutMenuItem(Component icon,
                                 ComponentEventListener<MenuItemClickEvent> listener)

        Constructs a new object with the given icon and click listener.

        Parameters:

        icon - the icon to display

        listener - the menu item click listener

      • AppLayoutMenuItem

        public AppLayoutMenuItem(String title,
                                 ComponentEventListener<MenuItemClickEvent> listener)

        Constructs a new object with the given title and click listener.

        Parameters:

        title - the title to display

        listener - the menu item click listener

      • AppLayoutMenuItem

        public AppLayoutMenuItem(Component icon,
                                 String title,
                                 ComponentEventListener<MenuItemClickEvent> listener)

        Constructs a new object with the given icon, title and click listener.

        Parameters:

        icon - the icon to display

        title - the title to display

        listener - the menu item click listener

    • Method Detail

      • getIcon

        public Component getIcon()

        Returns icon

      • setIcon

        public void setIcon(Component icon)

        Sets icon

        Parameters:

        icon - Icon to display in AppLayoutMenuItem

      • getTitle

        public String getTitle()

        Returns displayed AppLayoutMenuItem title

      • setTitle

        public void setTitle(String title)

        Sets AppLayoutMenuItem title

        Parameters:

        title - the displayed title of AppLayoutMenuItem

      • setRoute

        public void setRoute(String route)

        Sets the route to be navigated to when this menu item is selected.

        Parameters:

        route - Route to be navigated to

      • getRoute

        public String getRoute()

        Returns:

        Route associated with this menu item.