Class HorizontalMenu.AbstractContentMenuItem<T extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem<T>
Type Parameters:
T - root component type
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, com.vaadin.flow.component.shared.HasTooltip, MenuItem, Serializable
Direct Known Subclasses:
HorizontalMenu.MenuItem, HorizontalMenu.ParentMenuItem
Enclosing class:
HorizontalMenu

public abstract static class HorizontalMenu.AbstractContentMenuItem<T extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> extends HorizontalMenu.AbstractMenuItem<T> implements com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix
Provides base functionality for items that contain text with suffix and prefix components
See Also:
  • Field Details

    • CONTENT_ITEM_CLASS_NAME

      protected static final String CONTENT_ITEM_CLASS_NAME
      See Also:
    • PREFIX_COMPONENT_CLASS_NAME

      protected static final String PREFIX_COMPONENT_CLASS_NAME
      See Also:
    • TEXT_COMPONENT_CLASS_NAME

      protected static final String TEXT_COMPONENT_CLASS_NAME
      See Also:
    • SUFFIX_COMPONENT_CLASS_NAME

      protected static final String SUFFIX_COMPONENT_CLASS_NAME
      See Also:
    • PREFIXED_ATTRIBUTE_NAME

      protected static final String PREFIXED_ATTRIBUTE_NAME
      See Also:
    • SUFFIXED_ATTRIBUTE_NAME

      protected static final String SUFFIXED_ATTRIBUTE_NAME
      See Also:
    • prefixComponent

      protected com.vaadin.flow.component.Component prefixComponent
    • textComponent

      protected com.vaadin.flow.component.html.Span textComponent
    • suffixComponent

      protected com.vaadin.flow.component.Component suffixComponent
    • tooltip

      protected com.vaadin.flow.component.shared.Tooltip tooltip
  • Constructor Details

    • AbstractContentMenuItem

      public AbstractContentMenuItem()
    • AbstractContentMenuItem

      public AbstractContentMenuItem(String id)
  • Method Details

    • initContent

      protected T initContent()
      Overrides:
      initContent in class com.vaadin.flow.component.Composite<T extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents>
    • setTitle

      public void setTitle(@Nullable String title)
      Sets menu item text.
      Parameters:
      title - item text
    • updateContent

      protected void updateContent(@Nullable com.vaadin.flow.component.Component prefixComponent, @Nullable String title, @Nullable com.vaadin.flow.component.Component suffixComponent)
    • setPrefixComponentInternal

      protected void setPrefixComponentInternal(@Nullable com.vaadin.flow.component.Component prefixComponent)
    • setPrefixedAttribute

      protected void setPrefixedAttribute(boolean prefixed)
    • setTextComponentInternal

      protected void setTextComponentInternal(@Nullable String title)
    • setSuffixComponentInternal

      protected void setSuffixComponentInternal(@Nullable com.vaadin.flow.component.Component suffixComponent)
    • setSuffixedAttribute

      protected void setSuffixedAttribute(boolean suffixed)
    • setPrefixComponent

      public void setPrefixComponent(@Nullable com.vaadin.flow.component.Component component)
      Specified by:
      setPrefixComponent in interface com.vaadin.flow.component.shared.HasPrefix
    • getPrefixComponent

      @Nullable public com.vaadin.flow.component.Component getPrefixComponent()
      Specified by:
      getPrefixComponent in interface com.vaadin.flow.component.shared.HasPrefix
    • setSuffixComponent

      public void setSuffixComponent(@Nullable com.vaadin.flow.component.Component component)
      Specified by:
      setSuffixComponent in interface com.vaadin.flow.component.shared.HasSuffix
    • getSuffixComponent

      @Nullable public com.vaadin.flow.component.Component getSuffixComponent()
      Specified by:
      getSuffixComponent in interface com.vaadin.flow.component.shared.HasSuffix
    • getTitle

      @Nullable public String getTitle()
      Specified by:
      getTitle in interface MenuItem
      Returns:
      title of this menu item or null if no title has been set
    • setTooltipText

      public com.vaadin.flow.component.shared.Tooltip setTooltipText(String text)
      Specified by:
      setTooltipText in interface com.vaadin.flow.component.shared.HasTooltip
    • getTooltipInternal

      protected com.vaadin.flow.component.shared.Tooltip getTooltipInternal()
    • getTooltip

      public com.vaadin.flow.component.shared.Tooltip getTooltip()
      Specified by:
      getTooltip in interface com.vaadin.flow.component.shared.HasTooltip