Enum Class PopoverHeaderMode

java.lang.Object
java.lang.Enum<PopoverHeaderMode>
org.vaadin.addons.componentfactory.sidenavrail.PopoverHeaderMode
All Implemented Interfaces:
Serializable, Comparable<PopoverHeaderMode>, Constable

public enum PopoverHeaderMode extends Enum<PopoverHeaderMode>
Controls whether (and how) a SideNavRailItem's popover renders a header that identifies the item itself. The default is LABEL_ONLY.

The header is rendered above the nested SideNav that shows children, when the item has children. For leaf items shown via RailTooltipMode.POPOVER_HEADER, the header is the only content of the popover.

If the configured mode would produce an empty header, the header is omitted entirely rather than rendered blank. In particular, ICON_ONLY on an item whose only prefix is the auto-generated letter avatar produces no header at all: that fallback is deliberately treated as "no icon" for header purposes (it is a rail-mode visual crutch, not a real glyph).

Changes made after the popover has been rendered take effect immediately — the rail rewires all existing popovers when SideNavRail.setPopoverHeaderMode(org.vaadin.addons.componentfactory.sidenavrail.PopoverHeaderMode) is called. Changes to the parent's label or prefix component after the popover exists are picked up only on the next call to setPopoverHeaderMode; update the item before rendering or re-trigger the mode to refresh.

  • Enum Constant Details

    • NONE

      public static final PopoverHeaderMode NONE
      No header.
    • LABEL_ONLY

      public static final PopoverHeaderMode LABEL_ONLY
      Header shows the parent's text label only. Default.
    • ICON_ONLY

      public static final PopoverHeaderMode ICON_ONLY
      Header shows a copy of the parent's prefix component (typically an icon) only.
    • FULL

      public static final PopoverHeaderMode FULL
      Header shows both the prefix component and the label, icon first.
  • Method Details

    • values

      public static PopoverHeaderMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PopoverHeaderMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null