Class AppHeadroom.CondensedBar
java.lang.Object
org.vaadin.addons.joelpop.appheadroom.ui.component.AppHeadroom.CondensedBar
- Enclosing class:
AppHeadroom
One bar's condensed-view accessor (see
AppHeadroom.getCondensedTop()/
AppHeadroom.getCondensedBottom()) — pick a shape via asFloating()
or asRibbon() to get a shape-specific accessor exposing only
the methods that make sense for it, the same pattern Grid's
asSingleSelect()/asMultiSelect() already use for an
analogous "pick one of a few mutually-exclusive modes" choice.
Deliberately owns none of the app's own content, only which shape is currently configured — the app is never asked to get positioning or safe-area handling right itself; whichever shape it picks owns that entirely, so the app only ever supplies content.
-
Method Summary
Modifier and TypeMethodDescriptionShapes this bar's condensed view as a small, floating, auto-centered Component.asRibbon()Shapes this bar's condensed view as a full-width, opaque ribbon — background flush to the true screen edge, extending into the safe area exactly like the real bar's own landscape treatment, with only the content inset from the unsafe zone.
-
Method Details
-
asFloating
Shapes this bar's condensed view as a small, floating, auto-centered Component.AppHeadroomowns all of its positioning and safe-area clearance (reconciled against a sensible built-in default gap, never simply added on top of whatever padding the Component itself has) — supply only content; there's nothing else to configure.Calling this again, or
asRibbon(), tears down whatever this bar previously had first. -
asRibbon
Shapes this bar's condensed view as a full-width, opaque ribbon — background flush to the true screen edge, extending into the safe area exactly like the real bar's own landscape treatment, with only the content inset from the unsafe zone. Defaults tovar(--vaadin-background-container)(a base-theme property present under any theme, light/dark-aware automatically); override via the returned accessor'sAppHeadroom.RibbonCondensedBar.getStyle()if needed — expected to be rare, since the default already fits any theme.Calling this again, or
asFloating(), tears down whatever this bar previously had first.
-