Class 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.

page()
        .addSkipToContent(skipToContent("main-id"))
        .addMasthead(masthead())
        .addSidebar(pageSidebar())
        .addMain(pageMain("main-id"));
See Also:
  • Method Details

    • 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:
      attach in interface Attachable
    • detach

      public void detach(MutationRecord mutationRecord)
      Specified by:
      detach in interface Attachable
    • addSkipToContent

      public Page addSkipToContent(SkipToContent skipToContent)
      Adds the SkipToContent component as first element and removes the previous one (if any).
    • add

      public Page add(SkipToContent skipToContent)
      Adds the SkipToContent component as first element and removes the previous one (if any).
    • addMasthead

      public Page addMasthead(Masthead masthead)
      Adds the Masthead component and removes the previous one (if any).
    • add

      public Page add(Masthead masthead)
      Adds the Masthead component and removes the previous one (if any).
    • addSidebar

      public Page addSidebar(PageSidebar sidebar)
      Adds the PageSidebar component and removes the previous one (if any).
    • add

      public Page add(PageSidebar sidebar)
      Adds the PageSidebar component and removes the previous one (if any).
    • addMain

      public Page addMain(PageMain main)
      Adds the PageMain component and removes the previous one (if any).
    • add

      public Page add(PageMain main)
      Adds the PageMain component 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 the pf-m-breakpoint-[default|sm|md|lg|xl|2xl] class. You can override the default function Breakpoint.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 the pf-m-height-breakpoint-[default|sm|md|lg|xl|2xl] class. You can override the default function Breakpoint.verticalBreakpoint(int) to return breakpoints at different sizes than the default.
    • that

      public Page that()
      Specified by:
      that in interface TypedBuilder<HTMLDivElement,Page>
    • onResize

      public Page onResize(ResizeHandler<Page> resizeHandler)
    • masthead

      public Masthead masthead()
      Returns the current Masthead or null if no masthead has been defined yet.
    • sidebar

      public PageSidebar sidebar()
      Returns the current PageSidebar or null if no sidebar has been defined yet.
    • main

      public PageMain main()
      Returns the current PageMain or null if no main has been defined yet.