Package org.patternfly.component.page
Class Masthead
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLElement,Masthead>
-
- org.patternfly.component.page.Masthead
-
- All Implemented Interfaces:
Container<HTMLElement,Masthead>,Finder<HTMLElement>,HasElement<HTMLElement,Masthead>,HasHTMLElement<HTMLElement,Masthead>,IsElement<HTMLElement>,TypedBuilder<HTMLElement,Masthead>,Component,Modifiers.Inline<HTMLElement,Masthead>
public class Masthead extends BaseComponent<HTMLElement,Masthead> implements Modifiers.Inline<HTMLElement,Masthead>
A masthead contains global properties such as logotype, navigation and settings in an organized fashion, and it is accessible from all parts of the application.All pages should share a common masthead. Use
Page.masthead()to get the masthead.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MastheadaddBrand(Brand brand, String homeLink)Wraps the brand inside an<a/>element, adds the<a/>element to aMastheadMaincomponent and finally adds theMastheadMainto this component.MastheadaddContent()Adds aMastheadContentto this component.MastheadaddMain()Adds aMastheadMainto this component.MastheadaddToggle(MastheadToggle toggle)Adds aMastheadToggleto this component.MastheadaddToolbar(Toolbar toolbar)Wraps the toolbar inside aMastheadContentcomponent and adds theMastheadContentto this component.Mastheadinline(Breakpoint breakpoint)Modifies this component to have an inline display at the given breakpoint.Mastheadinset(Size size)Modifies this component to have a horizontal padding.Mastheadinset(Size size, Breakpoint breakpoint)Modifies this component to have a horizontal padding at the given breakpoint.Mastheadlight()Modifies this component to have a light theme with a background color of--pf-v5-global--BackgroundColor--200.Mastheadlighter()Modifies this component to have a light theme with a background color of--pf-v5-global--BackgroundColor--100.MastheadnoInset()Modifies this component to have no horizontal padding.MastheadnoInset(Breakpoint breakpoint)Modifies this component to have no horizontal padding at the given breakpoint.static MastheadpageMasthead()Factory method to create a new instance of this component.Mastheadstack()Modifies this component to have a stacked display.Mastheadstack(Breakpoint breakpoint)Modifies this component to have a stacked display at the given breakpoint.Mastheadthat()-
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.elemento.Container
add, add, addAll, addAll, addAll, addAll, addAll
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, css, id, id, innerHtml, on, textContent, toggle, toggle, toggle
-
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, title
-
Methods inherited from interface org.patternfly.core.Modifiers.Inline
inline, inline
-
-
-
-
Method Detail
-
pageMasthead
public static Masthead pageMasthead()
Factory method to create a new instance of this component.
-
that
public Masthead that()
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Masthead>
-
addToggle
public Masthead addToggle(MastheadToggle toggle)
Adds aMastheadToggleto this component.
-
addMain
public Masthead addMain()
Adds aMastheadMainto this component.
-
addBrand
public Masthead addBrand(Brand brand, String homeLink)
Wraps the brand inside an<a/>element, adds the<a/>element to aMastheadMaincomponent and finally adds theMastheadMainto this component.Shortcut for
-
addToolbar
public Masthead addToolbar(Toolbar toolbar)
Wraps the toolbar inside aMastheadContentcomponent and adds theMastheadContentto this component.Shortcut for
-
addContent
public Masthead addContent()
Adds aMastheadContentto this component.
-
noInset
public Masthead noInset()
Modifies this component to have no horizontal padding.
-
noInset
public Masthead noInset(Breakpoint breakpoint)
Modifies this component to have no horizontal padding at the given breakpoint.
-
inset
public Masthead inset(Size size, Breakpoint breakpoint)
Modifies this component to have a horizontal padding at the given breakpoint.
-
light
public Masthead light()
Modifies this component to have a light theme with a background color of--pf-v5-global--BackgroundColor--200.
-
lighter
public Masthead lighter()
Modifies this component to have a light theme with a background color of--pf-v5-global--BackgroundColor--100.
-
inline
public Masthead inline(Breakpoint breakpoint)
Modifies this component to have an inline display at the given breakpoint.
-
stack
public Masthead stack()
Modifies this component to have a stacked display.
-
stack
public Masthead stack(Breakpoint breakpoint)
Modifies this component to have a stacked display at the given breakpoint.
-
-