Enum Class RailTooltipMode

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

public enum RailTooltipMode extends Enum<RailTooltipMode>
Controls how root items of a SideNavRail surface their identity while the rail is in rail mode. Tooltips are never shown in normal mode — the label text identifies the item in that case.

The label source is the item's own getLabel(). Tooltips apply to direct children of the rail only; nested items never get a tooltip from the rail.

Both active modes (SIMPLE, POPOVER_HEADER) apply to every rail-mode root item. Combine with PopoverHeaderMode when POPOVER_HEADER is selected to control what the popover header shows.

  • Enum Constant Details

    • NONE

      public static final RailTooltipMode NONE
      No tooltips on root items.
    • SIMPLE

      public static final RailTooltipMode SIMPLE
      Lumo-themed CSS pseudo-element tooltip. Reacts to both hover and keyboard focus (via :focus-within). Immune to vaadin-tooltip-mixin's overlay dismissal because it does not participate in the overlay system.

      When combined with a parent-popover, the tooltip and popover both appear on the same item — the tooltip sits below the icon (default tooltip position), the popover opens to the right, so they don't spatially overlap. Use POPOVER_HEADER if you want a single overlay per item.

    • POPOVER_HEADER

      public static final RailTooltipMode POPOVER_HEADER
      Default. Tooltip is rendered as a Popover with the configured PopoverHeaderMode as its content. For items with children the existing parent-popover doubles as the tooltip — there is exactly one overlay per item. For leaf items a popover is created on demand whose only content is the header.

      Reacts to hover and keyboard focus (via Popover.setOpenOnFocus). Inherits hover/hide delays, position, and arrow visibility from the rail's existing popover settings.

      Constraint: requires a non-PopoverHeaderMode.NONE header — without one the popover would have no content. If the rail is attached with RailTooltipMode.POPOVER_HEADER and PopoverHeaderMode.NONE configured, the header mode is silently coerced to PopoverHeaderMode.LABEL_ONLY. Setting the combination via runtime setters after attach is not validated and may produce an empty popover.

  • Method Details

    • values

      public static RailTooltipMode[] 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 RailTooltipMode 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