java.lang.Object
com.aoapps.web.framework.WebPageLayout
com.aoapps.web.framework.TextOnlyLayout
The default text-only layout.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stylestatic final Stringstatic final Group.NameThe name of the application-scope group that will be used for text layout web resources.Fields inherited from class com.aoapps.web.framework.WebPageLayout
DOWN, NONE, UP, UP_AND_DOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureResources(ServletContext servletContext, WebSiteRequest req, HttpServletResponse resp, WebPage page, Registry requestRegistry) Configures the request-scope web resources that this layout uses.voidcontentHorizontalDivider(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) Prints a horizontal divider of the provided colspans.voidcontentTitle(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, String title, int contentColumns) Prints an entire content line including the provided title.<__ extends FlowContent<__>>
__contentVerticalDivider(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int direction, int colspan, int rowspan, String align, String width) Ends one part of a line and starts the next.voidendContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) Ends the content area of a page.protected voidendContentCopyright(WebSiteRequest req, HttpServletResponse resp, WebPage page, TABLE_c<DocumentEE> table, int totalColumns) voidendContentLine(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) Ends one line of content.voidendLightArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) Ends a lighter area of the site.voidendPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) Writes all of the HTML following the content of the page.voidendWhiteArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> whiteArea) Ends a white area of the site.WebPage[]getCommonPages(WebPage page, WebSiteRequest req) getGoogleAnalyticsNewTrackingCode(ServletContext servletContext) Gets the Google Analytics 4 (GA4) Measurement ID ornullif unavailable.getName()Each layout has a name.<__ extends FlowContent<__>>
voidprintBelowRelatedPages(__ td, WebSiteRequest req) Prints content below the related pages area on the left.<__ extends FlowContent<__>>
voidprintLogo(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ td) <PC extends FlowContent<PC>,__ extends ContentEE<__>>
__startContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, PC pc, int[] contentColumnSpans, String width) Starts the content area of a page.<__ extends FlowContent<__>>
__startContentLine(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int colspan, String align, String width) Starts one line of content with the initial colspan set to the provided colspan.<PC extends FlowContent<PC>,__ extends FlowContent<__>>
__startLightArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) Begins a lighter colored area of the site.<__ extends FlowContent<__>>
__startPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, DocumentEE document, String onload) Writes all of the HTML preceding the content of the page.<PC extends FlowContent<PC>,__ extends FlowContent<__>>
__startWhiteArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) Begins a white area of the site.static voidwriteBodyColorStyle(WebPageLayout layout, WebSiteRequest req, HEAD__<?> head) Writes the body color CSS stylesheet, if needed.Methods inherited from class com.aoapps.web.framework.WebPageLayout
content, content, content, content, content, content, contentHorizontalDivider, contentHorizontalDivider, contentLine, contentLine, contentLine, contentLine, contentTitle, contentTitle, contentTitle, contentVerticalDivider, doPage, doPage, endContent, endContent, endContentLine, getActiveLinkColor, getBackgroundColor, getLayoutChoices, getLinkColor, getTextColor, getVisitedLinkColor, lightArea, lightArea, lightArea, lightArea, printJavascriptIncludes, printSearchOutput, printWebPageLayoutSelector, startContent, startContent, startContentLine, startLightArea, startWhiteArea, whiteArea, whiteArea, whiteArea, whiteArea
-
Field Details
-
NAME
- See Also:
-
RESOURCE_GROUP
The name of the application-scope group that will be used for text layout web resources. -
LAYOUT_TEXT_CSS
-
-
Constructor Details
-
TextOnlyLayout
-
-
Method Details
-
configureResources
public void configureResources(ServletContext servletContext, WebSiteRequest req, HttpServletResponse resp, WebPage page, Registry requestRegistry) Description copied from class:WebPageLayoutConfigures the request-scope web resources that this layout uses.Implementers should call
super.configureResources(…)as a matter of convention, despite this default implementation doing nothing.- Overrides:
configureResourcesin classWebPageLayout
-
writeBodyColorStyle
public static void writeBodyColorStyle(WebPageLayout layout, WebSiteRequest req, HEAD__<?> head) throws IOException Writes the body color CSS stylesheet, if needed.- Throws:
IOException
-
startPage
public <__ extends FlowContent<__>> __ startPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, DocumentEE document, String onload) throws ServletException, IOException Description copied from class:WebPageLayoutWrites all of the HTML preceding the content of the page.Both the
SerializationandDoctypemay have been set on the request, and these must be considered in the HTML generation.- Specified by:
startPagein classWebPageLayout- Parameters:
onload- The onload script. Whennull, the page's default onload is used.- Returns:
- The
FlowContentthat should be used to write the page contents. This is also given toWebPageLayout.endPage(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)to finish the template. - Throws:
ServletExceptionIOException- See Also:
-
getGoogleAnalyticsNewTrackingCode
Gets the Google Analytics 4 (GA4) Measurement ID ornullif unavailable. -
endPage
public void endPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) throws ServletException, IOException Description copied from class:WebPageLayoutWrites all of the HTML following the content of the page.Both the
SerializationandDoctypemay have been set on the request, and these must be considered in the HTML generation.- Specified by:
endPagein classWebPageLayout- Parameters:
flow- TheFlowContentthat was returned byWebPageLayout.startPage(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.DocumentEE, java.lang.String).- Throws:
ServletExceptionIOException- See Also:
-
startContent
public <PC extends FlowContent<PC>,__ extends ContentEE<__>> __ startContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, PC pc, int[] contentColumnSpans, String width) throws ServletException, IOException Description copied from class:WebPageLayoutStarts the content area of a page. The content area provides additional features such as a nice border, and vertical and horizontal dividers.- Specified by:
startContentin classWebPageLayout- Type Parameters:
PC- The parent content model this area is within__- This content model, which will be the parent content model of child elements- Parameters:
width- Whennull, will use page's preferred width, if any. When"", will force no width specified.- Returns:
- The
ContentEEthat should be used to write the area contents. This is also given toWebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, java.lang.String),WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE),WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, java.lang.String, int),WebPageLayout.contentTitle(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int),WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE),WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String),WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE),WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, boolean),WebPageLayout.contentHorizontalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int[], boolean),WebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE),WebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int), andWebPageLayout.endContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.ContentEE, int[]). - Throws:
ServletExceptionIOException
-
contentTitle
public void contentTitle(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, String title, int contentColumns) throws ServletException, IOException Description copied from class:WebPageLayoutPrints an entire content line including the provided title. The colspan should match the total colspan in startContent for proper appearance- Specified by:
contentTitlein classWebPageLayout- Parameters:
content- TheContentEEthat was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String).- Throws:
ServletExceptionIOException
-
startContentLine
public <__ extends FlowContent<__>> __ startContentLine(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int colspan, String align, String width) throws ServletException, IOException Description copied from class:WebPageLayoutStarts one line of content with the initial colspan set to the provided colspan.- Specified by:
startContentLinein classWebPageLayout- Type Parameters:
__- This content model, which will be the parent content model of child elements- Parameters:
content- TheContentEEthat was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String).- Returns:
- The
FlowContentthat should be used to write the line contents. This is also given toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent),WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String),WebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent), andWebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, boolean). - Throws:
ServletExceptionIOException
-
contentVerticalDivider
public <__ extends FlowContent<__>> __ contentVerticalDivider(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int direction, int colspan, int rowspan, String align, String width) throws ServletException, IOException Description copied from class:WebPageLayoutEnds one part of a line and starts the next.- Specified by:
contentVerticalDividerin classWebPageLayout- Parameters:
contentLine- TheFlowContentthat was returned byWebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE),WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String),WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent), orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String).- Returns:
- The
FlowContentthat should be used to write the line contents. This is also given toWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent),WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String),WebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent), andWebPageLayout.endContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, boolean). - Throws:
ServletExceptionIOException
-
endContentLine
public void endContentLine(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) throws ServletException, IOException Description copied from class:WebPageLayoutEnds one line of content.- Specified by:
endContentLinein classWebPageLayout- Parameters:
contentLine- TheFlowContentthat was returned byWebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE),WebPageLayout.startContentLine(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.ContentEE, int, java.lang.String, java.lang.String),WebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent), orWebPageLayout.contentVerticalDivider(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, int, int, int, java.lang.String, java.lang.String).- Throws:
ServletExceptionIOException
-
contentHorizontalDivider
public void contentHorizontalDivider(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) throws ServletException, IOException Description copied from class:WebPageLayoutPrints a horizontal divider of the provided colspans.- Specified by:
contentHorizontalDividerin classWebPageLayout- Parameters:
content- TheContentEEthat was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String).- Throws:
ServletExceptionIOException
-
endContent
public void endContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) throws ServletException, IOException Description copied from class:WebPageLayoutEnds the content area of a page.- Specified by:
endContentin classWebPageLayout- Parameters:
content- TheContentEEthat was returned byWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent)WebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int, java.lang.String)orWebPageLayout.startContent(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.web.framework.WebPage, com.aoapps.html.servlet.FlowContent, int[], java.lang.String).- Throws:
ServletExceptionIOException
-
endContentCopyright
protected void endContentCopyright(WebSiteRequest req, HttpServletResponse resp, WebPage page, TABLE_c<DocumentEE> table, int totalColumns) throws ServletException, IOException - Throws:
ServletExceptionIOException
-
startLightArea
public <PC extends FlowContent<PC>,__ extends FlowContent<__>> __ startLightArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) throws ServletException, IOException Description copied from class:WebPageLayoutBegins a lighter colored area of the site.- Specified by:
startLightAreain classWebPageLayout- Type Parameters:
PC- The parent content model this area is within__- This content model, which will be the parent content model of child elements- Returns:
- The
FlowContentthat should be used to write the area contents. This is also given toWebPageLayout.endLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)to finish the area. - Throws:
ServletExceptionIOException
-
endLightArea
public void endLightArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) throws ServletException, IOException Description copied from class:WebPageLayoutEnds a lighter area of the site.- Specified by:
endLightAreain classWebPageLayout- Parameters:
lightArea- TheFlowContentthat was returned byWebPageLayout.startLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)orWebPageLayout.startLightArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, java.lang.String, java.lang.String, boolean).- Throws:
ServletExceptionIOException
-
startWhiteArea
public <PC extends FlowContent<PC>,__ extends FlowContent<__>> __ startWhiteArea(WebSiteRequest req, HttpServletResponse resp, PC pc, String align, String width, boolean nowrap) throws ServletException, IOException Description copied from class:WebPageLayoutBegins a white area of the site.- Specified by:
startWhiteAreain classWebPageLayout- Type Parameters:
PC- The parent content model this area is within__- This content model, which will be the parent content model of child elements- Returns:
- The
FlowContentthat should be used to write the area contents. This is also given toWebPageLayout.endWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)to finish the area. - Throws:
ServletExceptionIOException
-
endWhiteArea
public void endWhiteArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> whiteArea) throws ServletException, IOException Description copied from class:WebPageLayoutEnds a white area of the site.- Specified by:
endWhiteAreain classWebPageLayout- Parameters:
whiteArea- TheFlowContentthat was returned byWebPageLayout.startWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent)orWebPageLayout.startWhiteArea(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.FlowContent, java.lang.String, java.lang.String, boolean).- Throws:
ServletExceptionIOException
-
getName
Description copied from class:WebPageLayoutEach layout has a name.- Specified by:
getNamein classWebPageLayout
-
getCommonPages
- Throws:
ServletException
-
printLogo
public <__ extends FlowContent<__>> void printLogo(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ td) throws ServletException, IOException - Throws:
ServletExceptionIOException
-
printBelowRelatedPages
public <__ extends FlowContent<__>> void printBelowRelatedPages(__ td, WebSiteRequest req) throws ServletException, IOException Prints content below the related pages area on the left.- Throws:
ServletExceptionIOException
-
