|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.xpshared.htmlelements.HTMLElement com.plumtree.xpshared.htmlelements.HTMLPage
public class HTMLPage
This object can display an entire page of HTML, consisting of
one <html> element, one <head> element and one <body>
element.
Use the SetHead() and SetBody() methods to define the contents of this
HTML page.
Use the validateHTML() method to determine whether or not the html generated
by this object complies to the HTML 4 specification. This method requires
that CSE HTML Validator 5.0 be installed on the client computer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.plumtree.xpshared.htmlelements.HTMLElement |
---|
HTMLElement.ValidationLevel |
Field Summary | |
---|---|
static boolean |
bAlwaysValidateHTMLOnDisplay
Set this member true to cause the page to validate every time GetDisplayString() is called. |
static java.lang.String |
DOCTYPE_3_2
|
static java.lang.String |
DOCTYPE_4_0_FRAMESET
|
static java.lang.String |
DOCTYPE_4_0_STRICT
|
static java.lang.String |
DOCTYPE_4_0_TRANSITIONAL
|
static java.lang.String |
DOCTYPE_RENDERED
|
Fields inherited from class com.plumtree.xpshared.htmlelements.HTMLElement |
---|
aNewLine, bAllowEvents, bAllowSetStyleClassWithString, bCheckNestedStringForHTML, bDisplayDidPause, bEnforceMaxTableDepth, bForceFormattingOff, bForceFormattingOn, bPauseAfterDisplay, bPrintComments, bResumingAndChildFinished, bResumingAndChildInMidRender, bShowLang, iMaxTableDepth, sLangLocal, sNewLine, sTab |
Constructor Summary | |
---|---|
HTMLPage()
Creates a new HTMLPage object. |
Method Summary | |
---|---|
void |
AddInnerHTMLElement(HTMLElement e)
Do not call this method. |
protected void |
AppendBeginningOfOpeningTag(boolean bFormat,
XPStringBuilder sb,
IXPResponse response)
This method generates the beginning of the opening tag. |
protected void |
AppendClosingTag(boolean bFormat,
XPStringBuilder sb,
IXPResponse response)
This method generates the closing tag of this html element. |
void |
ClearBody()
Call this method to remove the HTMLBody object associated with this HTMLPage. |
HTMLBody |
GetBody()
Call this method to obtain the HTMLBody object describing the body of this html page. |
java.lang.String |
GetDisplayString()
HTMLElement.GetDisplayString rewritten. |
HTMLFrameSet |
GetFrameSet()
Call this method to get the HTMLFrameSet of this page. |
HTMLHead |
GetHead()
Call this method to obtain the HTMLHead object describing the head of this html page. |
protected XPStringBuilder |
GetStringBuilder()
This method is used to get a reasonable sized String Builder. |
protected boolean |
ProvidesClosingTag()
Indicates whether or not this HTML element provides a closing tag. |
void |
SetBody(HTMLBody b)
Call this method to set the body of this page. |
void |
SetFrameSet(HTMLFrameSet fs)
Call this method to set the frameset of this page. |
void |
SetHead(HTMLHead h)
Call this method to set the head of this html page. |
void |
ValidateHTML()
Call this method to determine whether or not the HTML generated by this HTMLPage object is valid HTML. CSE HTML Validator version 5.0 must be installed on the computer running this code. |
void |
ValidateHTML(boolean bSaveResults,
boolean bSaveOnlyErrors,
java.lang.String sFileName,
java.lang.String sPathName)
Call this method to have greater control over validation. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DOCTYPE_4_0_STRICT
public static final java.lang.String DOCTYPE_4_0_TRANSITIONAL
public static final java.lang.String DOCTYPE_4_0_FRAMESET
public static final java.lang.String DOCTYPE_3_2
public static java.lang.String DOCTYPE_RENDERED
public static boolean bAlwaysValidateHTMLOnDisplay
Constructor Detail |
---|
public HTMLPage()
Method Detail |
---|
protected XPStringBuilder GetStringBuilder()
GetStringBuilder
in class HTMLElement
public java.lang.String GetDisplayString()
GetDisplayString
in class HTMLElement
HTMLException
- Throws an exception if the html isn't valid
or cannot be generated.protected void AppendBeginningOfOpeningTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
AppendBeginningOfOpeningTag
in class HTMLElement
bFormat
- boolean indicating whether or not to format.sb
- XPStringBuilderresponse
- IXPResponseprotected void AppendClosingTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
AppendClosingTag
in class HTMLElement
bFormat
- boolean indicating whether or not to format.sb
- XPStringBuilderresponse
- IXPResponseprotected boolean ProvidesClosingTag()
ProvidesClosingTag
in class HTMLElement
public void ValidateHTML(boolean bSaveResults, boolean bSaveOnlyErrors, java.lang.String sFileName, java.lang.String sPathName) throws java.lang.Exception
bSaveResults
- save our results?bSaveOnlyErrors
- save only on errors?sFileName
- name of results file.sPathName
- path to results file.
java.lang.Exception
public void ValidateHTML() throws java.lang.Exception
try
{
myPage.validateHTML();
}
catch( HTMLException he )
{
System.out.println( he );
}
myPage.display( myResponse );
HTMLException
- This Exception will describe the location of a
file giving a complete rundown of all errors in the HTML.
java.lang.Exception
public void ClearBody()
public void AddInnerHTMLElement(HTMLElement e)
AddInnerHTMLElement
in class HTMLElement
public void SetHead(HTMLHead h)
public HTMLHead GetHead()
public HTMLFrameSet GetFrameSet()
public void SetFrameSet(HTMLFrameSet fs)
public void SetBody(HTMLBody b)
public HTMLBody GetBody()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |