Package org.patternfly.component.page
Class Page
- All Implemented Interfaces:
Attachable,ElementAttributeMethods<HTMLDivElement,,Page> ElementClassListMethods<HTMLDivElement,,Page> ElementConsumerMethods<HTMLDivElement,,Page> ElementContainerMethods<HTMLDivElement,,Page> ElementEventMethods<HTMLDivElement,,Page> ElementIdMethods<HTMLDivElement,,Page> ElementQueryMethods<HTMLDivElement>,HTMLElementAttributeMethods<HTMLDivElement,,Page> HTMLElementDataMethods<HTMLDivElement,,Page> HTMLElementStyleMethods<HTMLDivElement,,Page> HTMLElementVisibilityMethods<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, org.patternfly.style.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.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, org.patternfly.style.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.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hidden
-
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. -
noSidebar
-
verticalBreakpoint
public Page verticalBreakpoint(Function<Integer, org.patternfly.style.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
- 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.
-