Class NavigationItem

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.ListItem>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, 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, Serializable

    public class NavigationItem
    extends com.vaadin.flow.component.html.ListItem
    A component to reprecent an main view in the navigation menu
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

        com.vaadin.flow.component.HasText.WhiteSpace
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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> getNavigationTarget()  
      String getText()  
      void setEnabled​(boolean enabled)  
      • Methods inherited from class com.vaadin.flow.component.HtmlComponent

        getTitle, setTitle
      • 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, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.ClickNotifier

        addClickListener, addClickShortcut
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasEnabled

        isEnabled
      • Methods inherited from interface 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, setWidthFull
      • 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.HasText

        getWhiteSpace, setText, setWhiteSpace
    • Constructor Detail

      • NavigationItem

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

      • 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()
      • setEnabled

        public void setEnabled​(boolean enabled)