org.apache.hadoop.yarn.webapp.view
Class TwoColumnLayout

java.lang.Object
  extended by org.apache.hadoop.yarn.webapp.View
      extended by org.apache.hadoop.yarn.webapp.view.TextView
          extended by org.apache.hadoop.yarn.webapp.view.HtmlPage
              extended by org.apache.hadoop.yarn.webapp.view.TwoColumnLayout
All Implemented Interfaces:
Params
Direct Known Subclasses:
AggregatedLogsPage

public class TwoColumnLayout
extends HtmlPage

A simpler two column layout implementation with a header, a navigation bar on the left, content on the right, and a footer. Works with resizable themes.

See Also:
TwoColumnCssLayout

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.webapp.view.HtmlPage
HtmlPage._, HtmlPage.Page
 
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.webapp.View
View.ViewContext
 
Field Summary
 
Fields inherited from class org.apache.hadoop.yarn.webapp.view.HtmlPage
DOCTYPE
 
Fields inherited from class org.apache.hadoop.yarn.webapp.View
LOG
 
Fields inherited from interface org.apache.hadoop.yarn.webapp.Params
ERROR_DETAILS, TITLE, TITLE_LINK, USER
 
Constructor Summary
TwoColumnLayout()
           
 
Method Summary
protected  Class<? extends SubView> content()
           
protected  Class<? extends SubView> footer()
           
protected  Class<? extends SubView> header()
           
protected  Class<? extends SubView> nav()
           
protected  void postHead(Hamlet.HTML<HtmlPage._> html)
          Do what needs to be done after the header is rendered.
protected  void preHead(Hamlet.HTML<HtmlPage._> html)
          Do what needs to be done before the header is rendered.
protected  void render(Hamlet.HTML<HtmlPage._> html)
          Render the the HTML page.
protected  void setTableStyles(Hamlet.HTML<HtmlPage._> html, String tableId, String... innerStyles)
          Sets up a table to be a consistent style.
 
Methods inherited from class org.apache.hadoop.yarn.webapp.view.HtmlPage
render
 
Methods inherited from class org.apache.hadoop.yarn.webapp.view.TextView
echo, puts, writer
 
Methods inherited from class org.apache.hadoop.yarn.webapp.View
$, $, context, cookies, error, getInstance, inDevMode, info, injector, moreParams, outputStream, prefix, render, request, response, root_url, root, set, setTitle, setTitle, status, url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoColumnLayout

public TwoColumnLayout()
Method Detail

render

protected void render(Hamlet.HTML<HtmlPage._> html)
Description copied from class: HtmlPage
Render the the HTML page.

Specified by:
render in class HtmlPage
Parameters:
html - the page to render data to.

preHead

protected void preHead(Hamlet.HTML<HtmlPage._> html)
Do what needs to be done before the header is rendered. This usually involves setting page variables for Javascript and CSS rendering.

Parameters:
html - the html to use to render.

postHead

protected void postHead(Hamlet.HTML<HtmlPage._> html)
Do what needs to be done after the header is rendered.

Parameters:
html - the html to use to render.

header

protected Class<? extends SubView> header()
Returns:
the class that will render the header of the page.

content

protected Class<? extends SubView> content()
Returns:
the class that will render the content of the page.

nav

protected Class<? extends SubView> nav()
Returns:
the class that will render the navigation bar.

footer

protected Class<? extends SubView> footer()
Returns:
the class that will render the footer.

setTableStyles

protected void setTableStyles(Hamlet.HTML<HtmlPage._> html,
                              String tableId,
                              String... innerStyles)
Sets up a table to be a consistent style.

Parameters:
html - the HTML to use to render.
tableId - the ID of the table to set styles on.
innerStyles - any other styles to add to the table.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.