Package org.patternfly.component.page
Class Page
- All Implemented Interfaces:
Attachable,Container<HTMLDivElement,,Page> Finder<HTMLDivElement>,HasElement<HTMLDivElement,,Page> HasHTMLElement<HTMLDivElement,,Page> IsElement<HTMLDivElement>,TypedBuilder<HTMLDivElement,,Page> Component
The page component is used to define the basic layout of a page with either vertical or horizontal navigation.
page()
.addSkipToContent(skipToContent("main-id"))
.addMasthead(masthead())
.addSidebar(pageSidebar())
.addMain(pageMain("main-id"));
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds theMastheadcomponent and removes the previous one (if any).Adds thePageMaincomponent and removes the previous one (if any).add(PageSidebar sidebar) Adds thePageSidebarcomponent and removes the previous one (if any).add(SkipToContent skipToContent) Adds theSkipToContentcomponent as first element and removes the previous one (if any).Adds thePageMaincomponent and removes the previous one (if any).addMasthead(Masthead masthead) Adds theMastheadcomponent and removes the previous one (if any).addSidebar(PageSidebar sidebar) Adds thePageSidebarcomponent and removes the previous one (if any).addSkipToContent(SkipToContent skipToContent) Adds theSkipToContentcomponent as first element and removes the previous one (if any).voidattach(MutationRecord mutationRecord) 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.voiddetach(MutationRecord mutationRecord) main()Returns the currentPageMainornullif no main has been defined yet.masthead()Returns the currentMastheadornullif no masthead has been defined yet.onResize(ResizeHandler<Page> resizeHandler) static Pagepage()Create or returns the page singleton.static Pagepage(boolean newInstance) sidebar()Returns the currentPageSidebarornullif no sidebar has been defined yet.that()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.Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
-
Method Details
-
page
Create or returns the page singleton. -
page
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
addSkipToContent
Adds theSkipToContentcomponent as first element and removes the previous one (if any). -
add
Adds theSkipToContentcomponent as first element and removes the previous one (if any). -
addMasthead
Adds theMastheadcomponent and removes the previous one (if any). -
add
Adds theMastheadcomponent and removes the previous one (if any). -
addSidebar
Adds thePageSidebarcomponent and removes the previous one (if any). -
add
Adds thePageSidebarcomponent and removes the previous one (if any). -
addMain
Adds thePageMaincomponent and removes the previous one (if any). -
add
Adds thePageMaincomponent and removes the previous one (if any). -
breakpoint
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
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
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Page>
-
onResize
-
masthead
Returns the currentMastheadornullif no masthead has been defined yet. -
sidebar
Returns the currentPageSidebarornullif no sidebar has been defined yet. -
main
Returns the currentPageMainornullif no main has been defined yet.
-