Class NavigationItem

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.sidenav.SideNavItem
org.vaadin.firitin.appframework.NavigationItem
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, Serializable

public class NavigationItem extends com.vaadin.flow.component.sidenav.SideNavItem
A component to represent a main view in the navigation menu
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    NavigationItem(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addItem(com.vaadin.flow.component.sidenav.SideNavItem... arg0)
     
    void
    addItemAsFirst(com.vaadin.flow.component.sidenav.SideNavItem arg0)
     
    void
    addItemAtIndex(int arg0, com.vaadin.flow.component.sidenav.SideNavItem arg1)
     
    List<com.vaadin.flow.component.sidenav.SideNavItem>
     
    static String
    getMenuTextFromClass(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
    Detects a menu item text for a view class, based on various annotations and falling back to genearing one from the class name.
    Class<? extends com.vaadin.flow.component.Component>
     
     
    boolean
     
    void
    remove(com.vaadin.flow.component.sidenav.SideNavItem... arg0)
     
    void
     
    void
    setEnabled(boolean enabled)
     
    void
     

    Methods inherited from class com.vaadin.flow.component.sidenav.SideNavItem

    getLabel, getPath, getPathAliases, isExpanded, setExpanded, setLabel, setPath, setPath, setPathAliases, setQueryParameters, setupSideNavItem

    Methods inherited from class 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.shared.HasPrefix

    getPrefixComponent, setPrefixComponent

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.shared.HasSuffix

    getSuffixComponent, setSuffixComponent
  • Constructor Details

    • NavigationItem

      public NavigationItem(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
  • Method Details

    • getMenuTextFromClass

      public static String getMenuTextFromClass(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
      Detects a menu item text for a view class, based on various annotations and falling back to genearing one from the class name.
      Parameters:
      navigationTarget - the view class
      Returns:
      string used in the menu/breadcrump for the view
    • getText

      public String getText()
    • getNavigationTarget

      public Class<? extends com.vaadin.flow.component.Component> getNavigationTarget()
    • setPath

      public void setPath(String path)
      Overrides:
      setPath in class com.vaadin.flow.component.sidenav.SideNavItem
    • setEnabled

      public void setEnabled(boolean enabled)
    • isEnabled

      public boolean isEnabled()
    • addItem

      public void addItem(com.vaadin.flow.component.sidenav.SideNavItem... arg0)
    • addItemAsFirst

      public void addItemAsFirst(com.vaadin.flow.component.sidenav.SideNavItem arg0)
    • addItemAtIndex

      public void addItemAtIndex(int arg0, com.vaadin.flow.component.sidenav.SideNavItem arg1)
    • getItems

      public List<com.vaadin.flow.component.sidenav.SideNavItem> getItems()
    • remove

      public void remove(com.vaadin.flow.component.sidenav.SideNavItem... arg0)
    • removeAll

      public void removeAll()