com.aoindustries.website.framework
Class TextOnlyLayout

java.lang.Object
  extended by com.aoindustries.website.framework.WebPageLayout
      extended by com.aoindustries.website.framework.TextOnlyLayout

public class TextOnlyLayout
extends WebPageLayout

The default text-only layout.

Author:
AO Industries, Inc.

Field Summary
static java.lang.String HTTP_SERVLET_RESPONSE_STATUS
          Until version 3.0 there will not be a getStatus method on the HttpServletResponse class.
 
Fields inherited from class com.aoindustries.website.framework.WebPageLayout
DOWN, NONE, UP, UP_AND_DOWN
 
Constructor Summary
TextOnlyLayout(java.lang.String[] layoutChoices)
           
 
Method Summary
 void beginLightArea(WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, com.aoindustries.io.ChainWriter out, java.lang.String width, boolean nowrap)
          Begins a lighter colored area of the site.
 void beginWhiteArea(WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, com.aoindustries.io.ChainWriter out, java.lang.String width, boolean nowrap)
          Begins a lighter colored area of the site.
 void endContent(WebPage page, com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int[] contentColumnSpans)
          Ends the content area of a page.
 void endContentLine(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int rowspan, boolean endsInternal)
          Ends one line of content.
 void endHTML(WebPage page, WebSiteRequest req, com.aoindustries.io.ChainWriter out)
          Writes all of the HTML following the content of the page, whether the page is in a frameset or not.
 void endLightArea(WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, com.aoindustries.io.ChainWriter out)
          Ends a lighter area of the site.
 void endWhiteArea(WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, com.aoindustries.io.ChainWriter out)
          Ends a lighter area of the site.
 WebPage[] getCommonPages(WebPage page, WebSiteRequest req)
           
 java.lang.String getGoogleAnalyticsNewTrackingCode()
          Gets the Google Analytics New Tracking Code (ga.js) or null if unavailable.
 java.lang.String getName()
          Each layout has a name.
 void printBelowRelatedPages(com.aoindustries.io.ChainWriter out, WebSiteRequest req)
          Prints content below the related pages area on the left.
 void printContentHorizontalDivider(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int[] colspansAndDirections, boolean endsInternal)
          Prints a horizontal divider of the provided colspan.
 void printContentTitle(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String title, int contentColumns)
          Prints the title of the page in one row in the content area.
 void printContentVerticalDivider(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int direction, int colspan, int rowspan, java.lang.String align, java.lang.String width)
          Starts one line of content with the initial colspan set to the provided colspan.
 void printLogo(WebPage page, com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void startContent(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int[] contentColumnSpans, int preferredWidth)
          Starts the content area of a page.
 void startContentLine(com.aoindustries.io.ChainWriter out, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, int colspan, java.lang.String align, java.lang.String width)
          Starts one line of content with the initial colspan set to the provided colspan.
 void startHTML(WebPage page, WebSiteRequest req, javax.servlet.http.HttpServletResponse resp, com.aoindustries.io.ChainWriter out, java.lang.String onload)
          Writes all of the HTML preceeding the content of the page, whether the page is in a frameset or not.
 
Methods inherited from class com.aoindustries.website.framework.WebPageLayout
beginLightArea, beginWhiteArea, endContent, getActiveLinkColor, getBackgroundColor, getLayoutChoices, getLinkColor, getTextColor, getVisitedLinkColor, printContentHorizontalDivider, printContentTitle, printJavaScriptIncludes, printSearchOutput, printWebPageLayoutSelector, startContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_SERVLET_RESPONSE_STATUS

public static final java.lang.String HTTP_SERVLET_RESPONSE_STATUS
Until version 3.0 there will not be a getStatus method on the HttpServletResponse class. To allow code to detect the current status, anytime the status is set one should also set the request attribute of this name to a java.lang.Integer of the status. Matches value in com.aoindustries.website.Constants.HTTP_SERVLET_RESPONSE_STATUS for interoperability between the frameworks.

See Also:
Constant Field Values
Constructor Detail

TextOnlyLayout

public TextOnlyLayout(java.lang.String[] layoutChoices)
Method Detail

beginLightArea

public void beginLightArea(WebSiteRequest req,
                           javax.servlet.http.HttpServletResponse resp,
                           com.aoindustries.io.ChainWriter out,
                           java.lang.String width,
                           boolean nowrap)
Description copied from class: WebPageLayout
Begins a lighter colored area of the site.

Specified by:
beginLightArea in class WebPageLayout

endLightArea

public void endLightArea(WebSiteRequest req,
                         javax.servlet.http.HttpServletResponse resp,
                         com.aoindustries.io.ChainWriter out)
Description copied from class: WebPageLayout
Ends a lighter area of the site.

Specified by:
endLightArea in class WebPageLayout

beginWhiteArea

public void beginWhiteArea(WebSiteRequest req,
                           javax.servlet.http.HttpServletResponse resp,
                           com.aoindustries.io.ChainWriter out,
                           java.lang.String width,
                           boolean nowrap)
Description copied from class: WebPageLayout
Begins a lighter colored area of the site.

Specified by:
beginWhiteArea in class WebPageLayout

endWhiteArea

public void endWhiteArea(WebSiteRequest req,
                         javax.servlet.http.HttpServletResponse resp,
                         com.aoindustries.io.ChainWriter out)
Description copied from class: WebPageLayout
Ends a lighter area of the site.

Specified by:
endWhiteArea in class WebPageLayout

startHTML

public void startHTML(WebPage page,
                      WebSiteRequest req,
                      javax.servlet.http.HttpServletResponse resp,
                      com.aoindustries.io.ChainWriter out,
                      java.lang.String onload)
               throws java.io.IOException,
                      java.sql.SQLException
Description copied from class: WebPageLayout
Writes all of the HTML preceeding the content of the page, whether the page is in a frameset or not.

Specified by:
startHTML in class WebPageLayout
Throws:
java.io.IOException
java.sql.SQLException

getGoogleAnalyticsNewTrackingCode

public java.lang.String getGoogleAnalyticsNewTrackingCode()
Gets the Google Analytics New Tracking Code (ga.js) or null if unavailable.


endHTML

public void endHTML(WebPage page,
                    WebSiteRequest req,
                    com.aoindustries.io.ChainWriter out)
             throws java.io.IOException,
                    java.sql.SQLException
Description copied from class: WebPageLayout
Writes all of the HTML following the content of the page, whether the page is in a frameset or not.

Specified by:
endHTML in class WebPageLayout
Throws:
java.io.IOException
java.sql.SQLException

startContent

public void startContent(com.aoindustries.io.ChainWriter out,
                         WebSiteRequest req,
                         javax.servlet.http.HttpServletResponse resp,
                         int[] contentColumnSpans,
                         int preferredWidth)
Starts the content area of a page.

Specified by:
startContent in class WebPageLayout

printContentHorizontalDivider

public void printContentHorizontalDivider(com.aoindustries.io.ChainWriter out,
                                          WebSiteRequest req,
                                          javax.servlet.http.HttpServletResponse resp,
                                          int[] colspansAndDirections,
                                          boolean endsInternal)
Prints a horizontal divider of the provided colspan.

Specified by:
printContentHorizontalDivider in class WebPageLayout

printContentTitle

public void printContentTitle(com.aoindustries.io.ChainWriter out,
                              WebSiteRequest req,
                              javax.servlet.http.HttpServletResponse resp,
                              java.lang.String title,
                              int contentColumns)
Prints the title of the page in one row in the content area.

Specified by:
printContentTitle in class WebPageLayout

startContentLine

public void startContentLine(com.aoindustries.io.ChainWriter out,
                             WebSiteRequest req,
                             javax.servlet.http.HttpServletResponse resp,
                             int colspan,
                             java.lang.String align,
                             java.lang.String width)
Starts one line of content with the initial colspan set to the provided colspan.

Specified by:
startContentLine in class WebPageLayout

printContentVerticalDivider

public void printContentVerticalDivider(com.aoindustries.io.ChainWriter out,
                                        WebSiteRequest req,
                                        javax.servlet.http.HttpServletResponse resp,
                                        int direction,
                                        int colspan,
                                        int rowspan,
                                        java.lang.String align,
                                        java.lang.String width)
Starts one line of content with the initial colspan set to the provided colspan.

Specified by:
printContentVerticalDivider in class WebPageLayout

endContentLine

public void endContentLine(com.aoindustries.io.ChainWriter out,
                           WebSiteRequest req,
                           javax.servlet.http.HttpServletResponse resp,
                           int rowspan,
                           boolean endsInternal)
Ends one line of content.

Specified by:
endContentLine in class WebPageLayout

endContent

public void endContent(WebPage page,
                       com.aoindustries.io.ChainWriter out,
                       WebSiteRequest req,
                       javax.servlet.http.HttpServletResponse resp,
                       int[] contentColumnSpans)
                throws java.io.IOException,
                       java.sql.SQLException
Ends the content area of a page.

Specified by:
endContent in class WebPageLayout
Throws:
java.io.IOException
java.sql.SQLException

getName

public java.lang.String getName()
Description copied from class: WebPageLayout
Each layout has a name.

Specified by:
getName in class WebPageLayout

getCommonPages

public WebPage[] getCommonPages(WebPage page,
                                WebSiteRequest req)
                         throws java.io.IOException,
                                java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

printLogo

public void printLogo(WebPage page,
                      com.aoindustries.io.ChainWriter out,
                      WebSiteRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws java.io.IOException,
                      java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

printBelowRelatedPages

public void printBelowRelatedPages(com.aoindustries.io.ChainWriter out,
                                   WebSiteRequest req)
                            throws java.io.IOException,
                                   java.sql.SQLException
Prints content below the related pages area on the left.

Throws:
java.io.IOException
java.sql.SQLException