Package org.patternfly.component.page
Class Page
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLDivElement,Page>
-
- org.patternfly.component.page.Page
-
- All Implemented Interfaces:
Attachable,Container<HTMLDivElement,Page>,Finder<HTMLDivElement>,HasElement<HTMLDivElement,Page>,HasHTMLElement<HTMLDivElement,Page>,IsElement<HTMLDivElement>,TypedBuilder<HTMLDivElement,Page>,Component
public class Page extends BaseComponent<HTMLDivElement,Page> implements Attachable
The page component is used to define the basic layout of a page with either vertical or horizontal navigation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pageadd(Masthead masthead)Adds theMastheadcomponent and removes the previous one (if any).Pageadd(PageMain main)Adds thePageMaincomponent and removes the previous one (if any).Pageadd(PageSidebar sidebar)Adds thePageSidebarcomponent and removes the previous one (if any).Pageadd(SkipToContent skipToContent)Adds theSkipToContentcomponent as first element and removes the previous one (if any).PageaddMain(PageMain main)Adds thePageMaincomponent and removes the previous one (if any).PageaddMasthead(Masthead masthead)Adds theMastheadcomponent and removes the previous one (if any).PageaddSidebar(PageSidebar sidebar)Adds thePageSidebarcomponent and removes the previous one (if any).PageaddSkipToContent(SkipToContent skipToContent)Adds theSkipToContentcomponent as first element and removes the previous one (if any).voidattach(MutationRecord mutationRecord)Pagebreakpoint(Function<Integer,Breakpoint> breakpointFn)The page resize observer uses the breakpoints returned from this function when adding thepf-m-breakpoint-[default|sm|md|lg|xl|2xl]class.voiddetach(MutationRecord mutationRecord)PageMainmain()Returns the currentPageMainornullif no main has been defined yet.Mastheadmasthead()Returns the currentMastheadornullif no masthead has been defined yet.PageonResize(ResizeHandler<Page> resizeHandler)static Pagepage()Create or returns the page singleton.static Pagepage(boolean newInstance)PageSidebarsidebar()Returns the currentPageSidebarornullif no sidebar has been defined yet.Pagethat()PageverticalBreakpoint(Function<Integer,Breakpoint> verticalBreakpointFn)The page resize observer uses the breakpoints returned from this function when adding thepf-m-height-breakpoint-[default|sm|md|lg|xl|2xl]class.-
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, add, addAll, addAll, addAll, addAll, addAll, addAll
-
-
-
-
Method Detail
-
page
public static Page page()
Create or returns the page singleton.
-
page
public static Page page(boolean newInstance)
-
attach
public void attach(MutationRecord mutationRecord)
- Specified by:
attachin interfaceAttachable
-
detach
public void detach(MutationRecord mutationRecord)
- Specified by:
detachin interfaceAttachable
-
addSkipToContent
public Page addSkipToContent(SkipToContent skipToContent)
Adds theSkipToContentcomponent as first element and removes the previous one (if any).
-
add
public Page add(SkipToContent skipToContent)
Adds theSkipToContentcomponent as first element and removes the previous one (if any).
-
addMasthead
public Page addMasthead(Masthead masthead)
Adds theMastheadcomponent and removes the previous one (if any).
-
add
public Page add(Masthead masthead)
Adds theMastheadcomponent and removes the previous one (if any).
-
addSidebar
public Page addSidebar(PageSidebar sidebar)
Adds thePageSidebarcomponent and removes the previous one (if any).
-
add
public Page add(PageSidebar sidebar)
Adds thePageSidebarcomponent and removes the previous one (if any).
-
addMain
public Page addMain(PageMain main)
Adds thePageMaincomponent and removes the previous one (if any).
-
add
public Page add(PageMain main)
Adds thePageMaincomponent and removes the previous one (if any).
-
breakpoint
public Page breakpoint(Function<Integer,Breakpoint> breakpointFn)
The page resize observer uses the breakpoints returned from this function when adding thepf-m-breakpoint-[default|sm|md|lg|xl|2xl]class. You can override the default functionBreakpoint.breakpoint(int)to return breakpoints at different sizes than the default.
-
verticalBreakpoint
public Page verticalBreakpoint(Function<Integer,Breakpoint> verticalBreakpointFn)
The page resize observer uses the breakpoints returned from this function when adding thepf-m-height-breakpoint-[default|sm|md|lg|xl|2xl]class. You can override the default functionBreakpoint.verticalBreakpoint(int)to return breakpoints at different sizes than the default.
-
that
public Page that()
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Page>
-
onResize
public Page onResize(ResizeHandler<Page> resizeHandler)
-
masthead
public Masthead masthead()
Returns the currentMastheadornullif no masthead has been defined yet.
-
sidebar
public PageSidebar sidebar()
Returns the currentPageSidebarornullif no sidebar has been defined yet.
-
-