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 Style
static final String
static final Group.Name
The 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 TypeMethodDescriptionvoid
configureResources
(ServletContext servletContext, WebSiteRequest req, HttpServletResponse resp, WebPage page, Registry requestRegistry) Configures the request-scope web resources that this layout uses.void
contentHorizontalDivider
(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) Prints a horizontal divider of the provided colspans.void
contentTitle
(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.void
endContent
(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) Ends the content area of a page.protected void
endContentCopyright
(WebSiteRequest req, HttpServletResponse resp, WebPage page, TABLE_c<DocumentEE> table, int totalColumns) void
endContentLine
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) Ends one line of content.void
endLightArea
(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) Ends a lighter area of the site.void
endPage
(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) Writes all of the HTML following the content of the page.void
endWhiteArea
(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 ornull
if 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 void
writeBodyColorStyle
(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:WebPageLayout
Configures 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:
configureResources
in 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:WebPageLayout
Writes all of the HTML preceding the content of the page.Both the
Serialization
andDoctype
may have been set on the request, and these must be considered in the HTML generation.- Specified by:
startPage
in classWebPageLayout
- Parameters:
onload
- The onload script. Whennull
, the page's default onload is used.- Returns:
- The
FlowContent
that 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:
ServletException
IOException
- See Also:
-
getGoogleAnalyticsNewTrackingCode
Gets the Google Analytics 4 (GA4) Measurement ID ornull
if unavailable. -
endPage
public void endPage(WebSiteRequest req, HttpServletResponse resp, WebPage page, FlowContent<?> flow) throws ServletException, IOException Description copied from class:WebPageLayout
Writes all of the HTML following the content of the page.Both the
Serialization
andDoctype
may have been set on the request, and these must be considered in the HTML generation.- Specified by:
endPage
in classWebPageLayout
- Parameters:
flow
- TheFlowContent
that 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:
ServletException
IOException
- 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:WebPageLayout
Starts the content area of a page. The content area provides additional features such as a nice border, and vertical and horizontal dividers.- Specified by:
startContent
in 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
ContentEE
that 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:
ServletException
IOException
-
contentTitle
public void contentTitle(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, String title, int contentColumns) throws ServletException, IOException Description copied from class:WebPageLayout
Prints an entire content line including the provided title. The colspan should match the total colspan in startContent for proper appearance- Specified by:
contentTitle
in classWebPageLayout
- Parameters:
content
- TheContentEE
that 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:
ServletException
IOException
-
startContentLine
public <__ extends FlowContent<__>> __ startContentLine(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int colspan, String align, String width) throws ServletException, IOException Description copied from class:WebPageLayout
Starts one line of content with the initial colspan set to the provided colspan.- Specified by:
startContentLine
in classWebPageLayout
- Type Parameters:
__
- This content model, which will be the parent content model of child elements- Parameters:
content
- TheContentEE
that 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
FlowContent
that 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:
ServletException
IOException
-
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:WebPageLayout
Ends one part of a line and starts the next.- Specified by:
contentVerticalDivider
in classWebPageLayout
- Parameters:
contentLine
- TheFlowContent
that 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
FlowContent
that 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:
ServletException
IOException
-
endContentLine
public void endContentLine(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> contentLine, int rowspan, boolean endsInternal) throws ServletException, IOException Description copied from class:WebPageLayout
Ends one line of content.- Specified by:
endContentLine
in classWebPageLayout
- Parameters:
contentLine
- TheFlowContent
that 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:
ServletException
IOException
-
contentHorizontalDivider
public void contentHorizontalDivider(WebSiteRequest req, HttpServletResponse resp, ContentEE<?> content, int[] colspansAndDirections, boolean endsInternal) throws ServletException, IOException Description copied from class:WebPageLayout
Prints a horizontal divider of the provided colspans.- Specified by:
contentHorizontalDivider
in classWebPageLayout
- Parameters:
content
- TheContentEE
that 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:
ServletException
IOException
-
endContent
public void endContent(WebSiteRequest req, HttpServletResponse resp, WebPage page, ContentEE<?> content, int[] contentColumnSpans) throws ServletException, IOException Description copied from class:WebPageLayout
Ends the content area of a page.- Specified by:
endContent
in classWebPageLayout
- Parameters:
content
- TheContentEE
that 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:
ServletException
IOException
-
endContentCopyright
protected void endContentCopyright(WebSiteRequest req, HttpServletResponse resp, WebPage page, TABLE_c<DocumentEE> table, int totalColumns) throws ServletException, IOException - Throws:
ServletException
IOException
-
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:WebPageLayout
Begins a lighter colored area of the site.- Specified by:
startLightArea
in 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
FlowContent
that 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:
ServletException
IOException
-
endLightArea
public void endLightArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> lightArea) throws ServletException, IOException Description copied from class:WebPageLayout
Ends a lighter area of the site.- Specified by:
endLightArea
in classWebPageLayout
- Parameters:
lightArea
- TheFlowContent
that 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:
ServletException
IOException
-
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:WebPageLayout
Begins a white area of the site.- Specified by:
startWhiteArea
in 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
FlowContent
that 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:
ServletException
IOException
-
endWhiteArea
public void endWhiteArea(WebSiteRequest req, HttpServletResponse resp, FlowContent<?> whiteArea) throws ServletException, IOException Description copied from class:WebPageLayout
Ends a white area of the site.- Specified by:
endWhiteArea
in classWebPageLayout
- Parameters:
whiteArea
- TheFlowContent
that 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:
ServletException
IOException
-
getName
Description copied from class:WebPageLayout
Each layout has a name.- Specified by:
getName
in classWebPageLayout
-
getCommonPages
- Throws:
ServletException
-
printLogo
public <__ extends FlowContent<__>> void printLogo(WebSiteRequest req, HttpServletResponse resp, WebPage page, __ td) throws ServletException, IOException - Throws:
ServletException
IOException
-
printBelowRelatedPages
public <__ extends FlowContent<__>> void printBelowRelatedPages(__ td, WebSiteRequest req) throws ServletException, IOException Prints content below the related pages area on the left.- Throws:
ServletException
IOException
-