|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.html.Element org.mortbay.html.Composite org.mortbay.html.Page
public class Page
HTML Page. A HTML Page extends composite with the addition of the HTML Header tags, fields and elements. Furthermore, individual parts of the page may be written or the progressive page be output with flush.
Pages contain parameters and named sections. These are used by derived Page classes that implement a Look and Feel. Page users may add to name sections such as "Margin" or "Footer" and set parameters such as "HelpUrl" without knowledge of how the look and feel will arrange these. To assist with standard look and feel creation Page defines a set of standard names for many common parameters and sections.
If named sections are used, the page constructor or completeSections must add the named section to the page in the appropriate places. If named sections are not added to the page, then they can only be written with an explicit call to write(out,"section",end); Changes in behaviour to section creation and adding, should be controlled via page properties.
Composite
Field Summary | |
---|---|
static String |
Back
Deprecated. |
static String |
BaseUrl
Deprecated. |
static String |
BgColour
Deprecated. |
static String |
Content
Deprecated. |
static String |
ContentSize
Deprecated. |
static String |
FgColour
Deprecated. |
static String |
Footer
Deprecated. |
static String |
FooterSize
Deprecated. |
static String |
Header
Deprecated. |
static String |
HeaderSize
Deprecated. |
static String |
Heading
Deprecated. |
static String |
Help
Deprecated. |
static String |
HighlightColour
Deprecated. |
static String |
Home
Deprecated. |
static String |
LeftMargin
Deprecated. |
static String |
LeftMarginSize
Deprecated. |
static String |
Margin
Deprecated. |
static String |
MarginSize
Deprecated. |
static String |
Next
Deprecated. |
static String |
NoTitle
Deprecated. |
static String |
PageType
Deprecated. |
static String |
Prev
Deprecated. |
protected Hashtable |
properties
Deprecated. |
static String |
Request
Deprecated. |
static String |
Response
Deprecated. |
static String |
RightMargin
Deprecated. |
static String |
RightMarginSize
Deprecated. |
static String |
Section
Deprecated. |
static String |
Target
Deprecated. |
static String |
Title
Deprecated. |
static String |
Up
Deprecated. |
Fields inherited from class org.mortbay.html.Composite |
---|
elements, nest |
Fields inherited from class org.mortbay.html.Element |
---|
ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH |
Constructor Summary | |
---|---|
Page()
Deprecated. |
|
Page(String title)
Deprecated. |
|
Page(String title,
String attributes)
Deprecated. |
Method Summary | |
---|---|
Page |
addHeader(Object o)
Deprecated. Add element or object to the page header. |
void |
addSection(String section,
Composite composite)
Deprecated. Set a composite as a named section and add it to the. |
void |
addTo(String section,
Object element)
Deprecated. Add content to a named sections. |
protected void |
completeSections()
Deprecated. This call back is called just before writeHeaders() actually writes the HTML page headers. |
void |
flush(Writer out)
Deprecated. |
FrameSet |
frameSet()
Deprecated. Return the preferred FrameSet to be used with a specialized Page. |
Composite |
getSection(String section)
Deprecated. Get a composite as a named section. |
Dictionary |
properties()
Deprecated. Access the page properties. |
void |
rewind()
Deprecated. |
Page |
setBackGroundColor(String color)
Deprecated. Set page background color. |
Page |
setBackGroundImage(String bg)
Deprecated. Set page background image. |
Page |
setBase(String target,
String href)
Deprecated. Set the URL Base for the Page. |
void |
setSection(String section,
Composite composite)
Deprecated. Set a composite as a named section. |
Page |
title(String title)
Deprecated. Set page title. |
void |
write(Writer out)
Deprecated. Write the entire page by calling: writeHtmlHead(out) writeBodyTag(out) writeElements(out) writeHtmlEnd(out) |
void |
write(Writer out,
String section,
boolean endHtml)
Deprecated. Write page section. |
void |
writeBodyTag(Writer out)
Deprecated. Write HTML page body tag. |
void |
writeElements(Writer out)
Deprecated. Write any body elements of the page. |
void |
writeHtmlEnd(Writer out)
Deprecated. Write end BODY and end HTML tags. |
void |
writeHtmlHead(Writer out)
Deprecated. Write HTML page head tags. |
Methods inherited from class org.mortbay.html.Composite |
---|
add, contents, nest, replace, reset, setNest, size, unnest |
Methods inherited from class org.mortbay.html.Element |
---|
attribute, attribute, attribute, attributes, attributes, bgColor, bottom, center, color, cssClass, cssID, height, height, height, left, middle, right, setAttributesFrom, size, size, style, top, toString, width, width, width, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Request
public static final String Response
public static final String Header
public static final String Title
public static final String Section
public static final String HeaderSize
public static final String Footer
public static final String FooterSize
public static final String Content
public static final String ContentSize
public static final String Margin
public static final String MarginSize
public static final String LeftMargin
public static final String LeftMarginSize
public static final String RightMargin
public static final String RightMarginSize
public static final String Help
public static final String Home
public static final String Heading
public static final String Up
public static final String Prev
public static final String Next
public static final String Back
public static final String Target
public static final String BaseUrl
public static final String FgColour
public static final String BgColour
public static final String HighlightColour
public static final String PageType
public static final String NoTitle
protected Hashtable properties
Constructor Detail |
---|
public Page()
public Page(String title)
public Page(String title, String attributes)
Method Detail |
---|
public Page title(String title)
public Page addHeader(Object o)
o
- The Object to add. If it is a String or Element, it is
added directly, otherwise toString() is called.
public final Page setBackGroundImage(String bg)
public final Page setBackGroundColor(String color)
public final Page setBase(String target, String href)
target
- Default link target, null if none.href
- Default absolute href, null if none.
public void write(Writer out) throws IOException
write
in class Composite
out
- Writer to write the element to.
IOException
public void writeHtmlHead(Writer out) throws IOException
IOException
public void writeBodyTag(Writer out) throws IOException
IOException
public void writeHtmlEnd(Writer out) throws IOException
IOException
public void writeElements(Writer out) throws IOException
IOException
public void write(Writer out, String section, boolean endHtml) throws IOException
IOException
public void flush(Writer out) throws IOException
IOException
public void rewind()
public Dictionary properties()
public FrameSet frameSet()
public void setSection(String section, Composite composite)
public void addSection(String section, Composite composite)
public Composite getSection(String section)
public void addTo(String section, Object element)
protected void completeSections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |