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 theMasthead
component and removes the previous one (if any).Adds thePageMain
component and removes the previous one (if any).add
(PageSidebar sidebar) Adds thePageSidebar
component and removes the previous one (if any).add
(SkipToContent skipToContent) Adds theSkipToContent
component as first element and removes the previous one (if any).Adds thePageMain
component and removes the previous one (if any).addMasthead
(Masthead masthead) Adds theMasthead
component and removes the previous one (if any).addSidebar
(PageSidebar sidebar) Adds thePageSidebar
component and removes the previous one (if any).addSkipToContent
(SkipToContent skipToContent) Adds theSkipToContent
component as first element and removes the previous one (if any).void
attach
(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.void
detach
(MutationRecord mutationRecord) main()
Returns the currentPageMain
ornull
if no main has been defined yet.masthead()
Returns the currentMasthead
ornull
if no masthead has been defined yet.onResize
(ResizeHandler<Page> resizeHandler) static Page
page()
Create or returns the page singleton.static Page
page
(boolean newInstance) sidebar()
Returns the currentPageSidebar
ornull
if 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, 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 Details
-
page
Create or returns the page singleton. -
page
-
attach
- Specified by:
attach
in interfaceAttachable
-
detach
- Specified by:
detach
in interfaceAttachable
-
addSkipToContent
Adds theSkipToContent
component as first element and removes the previous one (if any). -
add
Adds theSkipToContent
component as first element and removes the previous one (if any). -
addMasthead
Adds theMasthead
component and removes the previous one (if any). -
add
Adds theMasthead
component and removes the previous one (if any). -
addSidebar
Adds thePageSidebar
component and removes the previous one (if any). -
add
Adds thePageSidebar
component and removes the previous one (if any). -
addMain
Adds thePageMain
component and removes the previous one (if any). -
add
Adds thePageMain
component 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:
that
in interfaceTypedBuilder<HTMLDivElement,
Page>
-
onResize
-
masthead
Returns the currentMasthead
ornull
if no masthead has been defined yet. -
sidebar
Returns the currentPageSidebar
ornull
if no sidebar has been defined yet. -
main
Returns the currentPageMain
ornull
if no main has been defined yet.
-