Class HtmlTree
- java.lang.Object
-
- gw.gosudoc.com.sun.tools.doclets.internal.toolkit.Content
-
- gw.gosudoc.com.sun.tools.doclets.formats.html.markup.HtmlTree
-
@Deprecated public class HtmlTree extends Content
Deprecated.Class for generating HTML tree for javadoc output.This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
- Author:
- Bhavesh Patel
-
-
Field Summary
Fields Modifier and Type Field Description static Content
EMPTY
Deprecated.static BitSet
NONENCODING_CHARS
Deprecated.A set of ASCII URI characters to be left unencoded.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HtmlTree
A(HtmlVersion htmlVersion, String attr, Content body)
Deprecated.Generates an HTML anchor tag with an id or a name attribute and content.static HtmlTree
A(String ref, Content body)
Deprecated.Generates an HTML anchor tag.static HtmlTree
A_ID(String id, Content body)
Deprecated.Generates an HTML anchor tag with id attribute and a body.void
addAttr(HtmlAttr attrName, String attrValue)
Deprecated.Adds an attribute for the HTML tag.void
addContent(Content tagContent)
Deprecated.Adds content for the HTML tag.void
addContent(String stringContent)
Deprecated.This method adds a string content to the htmltree.void
addStyle(HtmlStyle style)
Deprecated.Adds a style for the HTML tag.static HtmlTree
CAPTION(Content body)
Deprecated.Generates a CAPTION tag with some content.int
charCount()
Deprecated.Return the number of characters of plain text content in this object (optional operation.)static HtmlTree
CODE(Content body)
Deprecated.Generates a CODE tag with some content.static HtmlTree
DD(Content body)
Deprecated.Generates a DD tag with some content.static HtmlTree
DIV(HtmlStyle styleClass, Content body)
Deprecated.Generates a DIV tag with the style class attributes.static HtmlTree
DIV(Content body)
Deprecated.Generates a DIV tag with some content.static HtmlTree
DL(Content body)
Deprecated.Generates a DL tag with some content.static HtmlTree
DT(Content body)
Deprecated.Generates a DT tag with some content.static HtmlTree
FOOTER()
Deprecated.Generates a FOOTER tag with role attribute.boolean
hasAttr(HtmlAttr attrName)
Deprecated.Returns true if the HTML tree has a specific attribute.boolean
hasAttrs()
Deprecated.Returns true if the HTML tree has attributes.boolean
hasContent()
Deprecated.Returns true if the HTML tree has content.static HtmlTree
HEADER()
Deprecated.Generates a HEADER tag with role attribute.static HtmlTree
HEADING(HtmlTag headingTag, boolean printTitle, HtmlStyle styleClass, Content body)
Deprecated.Generates a heading tag (h1 to h6) with the title and style class attributes.static HtmlTree
HEADING(HtmlTag headingTag, boolean printTitle, Content body)
Deprecated.Generates a heading tag (h1 to h6) with the title attribute.static HtmlTree
HEADING(HtmlTag headingTag, HtmlStyle styleClass, Content body)
Deprecated.Generates a heading tag (h1 to h6) with style class attribute.static HtmlTree
HEADING(HtmlTag headingTag, Content body)
Deprecated.Generates a heading tag (h1 to h6) with some content.static HtmlTree
HTML(String lang, Content head, Content body)
Deprecated.Generates an HTML tag with lang attribute.static HtmlTree
IFRAME(String src, String name, String title)
Deprecated.Generates a IFRAME tag.static HtmlTree
INPUT(String type, String id)
Deprecated.Generates a INPUT tag with some id.boolean
isEmpty()
Deprecated.Returns true if the content is empty.boolean
isInline()
Deprecated.Returns true if the element is an inline element.boolean
isValid()
Deprecated.Returns true if the HTML tree is valid.static HtmlTree
LI(HtmlStyle styleClass, Content body)
Deprecated.Generates a LI tag with some content.static HtmlTree
LI(Content body)
Deprecated.Generates a LI tag with some content.static HtmlTree
LINK(String rel, String type, String href, String title)
Deprecated.Generates a LINK tag with the rel, type, href and title attributes.static HtmlTree
MAIN()
Deprecated.Generates a MAIN tag with role attribute.static HtmlTree
MAIN(HtmlStyle styleClass, Content body)
Deprecated.Generates a MAIN tag with role attribute, style attribute and some content.static HtmlTree
MAIN(Content body)
Deprecated.Generates a MAIN tag with role attribute and some content.static HtmlTree
META(String name, String content)
Deprecated.Generates a META tag with the name and content attributes.static HtmlTree
META(String httpEquiv, String content, String charSet)
Deprecated.Generates a META tag with the http-equiv, content and charset attributes.static HtmlTree
NAV()
Deprecated.Generates a NAV tag with the role attribute.static HtmlTree
NOSCRIPT(Content body)
Deprecated.Generates a NOSCRIPT tag with some content.static HtmlTree
P(HtmlStyle styleClass, Content body)
Deprecated.Generates a P tag with some content.static HtmlTree
P(Content body)
Deprecated.Generates a P tag with some content.static HtmlTree
SCRIPT()
Deprecated.Generates a SCRIPT tag with the type attribute.static HtmlTree
SCRIPT(String src)
Deprecated.Generates a SCRIPT tag with the type and src attributes.static HtmlTree
SECTION()
Deprecated.Generates a SECTION tag with role attribute.static HtmlTree
SECTION(Content body)
Deprecated.Generates a SECTION tag with role attribute and some content.void
setRole(HtmlAttr.Role role)
Deprecated.void
setTitle(Content body)
Deprecated.static HtmlTree
SMALL(Content body)
Deprecated.Generates a SMALL tag with some content.static HtmlTree
SPAN(HtmlStyle styleClass, Content body)
Deprecated.Generates a SPAN tag with style class attribute and some content.static HtmlTree
SPAN(Content body)
Deprecated.Generates a SPAN tag with some content.static HtmlTree
SPAN(String id, HtmlStyle styleClass, Content body)
Deprecated.Generates a SPAN tag with id and style class attributes.static HtmlTree
TABLE(HtmlStyle styleClass, Content body)
Deprecated.Generates a Table tag with style class attribute and some content.static HtmlTree
TABLE(HtmlStyle styleClass, String summary, Content body)
Deprecated.Generates a Table tag with style class and summary attributes and some content.static HtmlTree
TD(HtmlStyle styleClass, Content body)
Deprecated.Generates a TD tag with style class attribute and some content.static HtmlTree
TD(Content body)
Deprecated.Generates a TD tag for an HTML table with some content.static HtmlTree
TH(HtmlStyle styleClass, String scope, Content body)
Deprecated.Generates a TH tag with style class and scope attributes and some content.static HtmlTree
TH(String scope, Content body)
Deprecated.Generates a TH tag with scope attribute and some content.static HtmlTree
TITLE(Content body)
Deprecated.Generates a TITLE tag with some content.static HtmlTree
TR(Content body)
Deprecated.Generates a TR tag for an HTML table with some content.static HtmlTree
UL(HtmlStyle styleClass, Content body)
Deprecated.Generates a UL tag with the style class attribute and some content.boolean
write(Writer out, boolean atNewline)
Deprecated.Writes content to a writer.
-
-
-
Constructor Detail
-
HtmlTree
public HtmlTree(HtmlTag tag)
Deprecated.Constructor to construct HtmlTree object.- Parameters:
tag
- HTML tag for the HtmlTree object
-
-
Method Detail
-
addAttr
public void addAttr(HtmlAttr attrName, String attrValue)
Deprecated.Adds an attribute for the HTML tag.- Parameters:
attrName
- name of the attributeattrValue
- value of the attribute
-
setTitle
public void setTitle(Content body)
Deprecated.
-
setRole
public void setRole(HtmlAttr.Role role)
Deprecated.
-
addStyle
public void addStyle(HtmlStyle style)
Deprecated.Adds a style for the HTML tag.- Parameters:
style
- style to be added
-
addContent
public void addContent(Content tagContent)
Deprecated.Adds content for the HTML tag.- Specified by:
addContent
in classContent
- Parameters:
tagContent
- tag content to be added
-
addContent
public void addContent(String stringContent)
Deprecated.This method adds a string content to the htmltree. If the last content member added is a StringContent, append the string to that StringContent or else create a new StringContent and add it to the html tree.- Specified by:
addContent
in classContent
- Parameters:
stringContent
- string content that needs to be added
-
charCount
public int charCount()
Deprecated.Description copied from class:Content
Return the number of characters of plain text content in this object (optional operation.)
-
A
public static HtmlTree A(String ref, Content body)
Deprecated.Generates an HTML anchor tag.- Parameters:
ref
- reference url for the anchor tagbody
- content for the anchor tag- Returns:
- an HtmlTree object
-
A
public static HtmlTree A(HtmlVersion htmlVersion, String attr, Content body)
Deprecated.Generates an HTML anchor tag with an id or a name attribute and content.- Parameters:
htmlVersion
- the version of the generated HTMLattr
- name or id attribute for the anchor tagbody
- content for the anchor tag- Returns:
- an HtmlTree object
-
A_ID
public static HtmlTree A_ID(String id, Content body)
Deprecated.Generates an HTML anchor tag with id attribute and a body.- Parameters:
id
- id for the anchor tagbody
- body for the anchor tag- Returns:
- an HtmlTree object
-
CAPTION
public static HtmlTree CAPTION(Content body)
Deprecated.Generates a CAPTION tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the CAPTION tag
-
CODE
public static HtmlTree CODE(Content body)
Deprecated.Generates a CODE tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the CODE tag
-
DD
public static HtmlTree DD(Content body)
Deprecated.Generates a DD tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the DD tag
-
DL
public static HtmlTree DL(Content body)
Deprecated.Generates a DL tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the DL tag
-
DIV
public static HtmlTree DIV(HtmlStyle styleClass, Content body)
Deprecated.Generates a DIV tag with the style class attributes. It also encloses a content.- Parameters:
styleClass
- stylesheet class for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the DIV tag
-
DIV
public static HtmlTree DIV(Content body)
Deprecated.Generates a DIV tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the DIV tag
-
DT
public static HtmlTree DT(Content body)
Deprecated.Generates a DT tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the DT tag
-
FOOTER
public static HtmlTree FOOTER()
Deprecated.Generates a FOOTER tag with role attribute.- Returns:
- an HtmlTree object for the FOOTER tag
-
HEADER
public static HtmlTree HEADER()
Deprecated.Generates a HEADER tag with role attribute.- Returns:
- an HtmlTree object for the HEADER tag
-
HEADING
public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, HtmlStyle styleClass, Content body)
Deprecated.Generates a heading tag (h1 to h6) with the title and style class attributes. It also encloses a content.- Parameters:
headingTag
- the heading tag to be generatedprintTitle
- true if title for the tag needs to be printed else falsestyleClass
- stylesheet class for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the tag
-
HEADING
public static HtmlTree HEADING(HtmlTag headingTag, HtmlStyle styleClass, Content body)
Deprecated.Generates a heading tag (h1 to h6) with style class attribute. It also encloses a content.- Parameters:
headingTag
- the heading tag to be generatedstyleClass
- stylesheet class for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the tag
-
HEADING
public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, Content body)
Deprecated.Generates a heading tag (h1 to h6) with the title attribute. It also encloses a content.- Parameters:
headingTag
- the heading tag to be generatedprintTitle
- true if the title for the tag needs to be printed else falsebody
- content for the tag- Returns:
- an HtmlTree object for the tag
-
HEADING
public static HtmlTree HEADING(HtmlTag headingTag, Content body)
Deprecated.Generates a heading tag (h1 to h6) with some content.- Parameters:
headingTag
- the heading tag to be generatedbody
- content for the tag- Returns:
- an HtmlTree object for the tag
-
HTML
public static HtmlTree HTML(String lang, Content head, Content body)
Deprecated.Generates an HTML tag with lang attribute. It also adds head and body content to the HTML tree.- Parameters:
lang
- language for the HTML documenthead
- head for the HTML tagbody
- body for the HTML tag- Returns:
- an HtmlTree object for the HTML tag
-
IFRAME
public static HtmlTree IFRAME(String src, String name, String title)
Deprecated.Generates a IFRAME tag.- Parameters:
src
- the url of the document to be shown in the framename
- specifies the name of the frametitle
- the title for the frame- Returns:
- an HtmlTree object for the IFRAME tag
-
INPUT
public static HtmlTree INPUT(String type, String id)
Deprecated.Generates a INPUT tag with some id.- Parameters:
type
- the type of inputid
- id for the tag- Returns:
- an HtmlTree object for the INPUT tag
-
LI
public static HtmlTree LI(Content body)
Deprecated.Generates a LI tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the LI tag
-
LI
public static HtmlTree LI(HtmlStyle styleClass, Content body)
Deprecated.Generates a LI tag with some content.- Parameters:
styleClass
- style for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the LI tag
-
LINK
public static HtmlTree LINK(String rel, String type, String href, String title)
Deprecated.Generates a LINK tag with the rel, type, href and title attributes.- Parameters:
rel
- relevance of the linktype
- type of linkhref
- the path for the linktitle
- title for the link- Returns:
- an HtmlTree object for the LINK tag
-
MAIN
public static HtmlTree MAIN()
Deprecated.Generates a MAIN tag with role attribute.- Returns:
- an HtmlTree object for the MAIN tag
-
MAIN
public static HtmlTree MAIN(Content body)
Deprecated.Generates a MAIN tag with role attribute and some content.- Parameters:
body
- content of the MAIN tag- Returns:
- an HtmlTree object for the MAIN tag
-
MAIN
public static HtmlTree MAIN(HtmlStyle styleClass, Content body)
Deprecated.Generates a MAIN tag with role attribute, style attribute and some content.- Parameters:
styleClass
- style of the MAIN tagbody
- content of the MAIN tag- Returns:
- an HtmlTree object for the MAIN tag
-
META
public static HtmlTree META(String httpEquiv, String content, String charSet)
Deprecated.Generates a META tag with the http-equiv, content and charset attributes.- Parameters:
httpEquiv
- http equiv attribute for the META tagcontent
- type of contentcharSet
- character set used- Returns:
- an HtmlTree object for the META tag
-
META
public static HtmlTree META(String name, String content)
Deprecated.Generates a META tag with the name and content attributes.- Parameters:
name
- name attributecontent
- type of content- Returns:
- an HtmlTree object for the META tag
-
NAV
public static HtmlTree NAV()
Deprecated.Generates a NAV tag with the role attribute.- Returns:
- an HtmlTree object for the NAV tag
-
NOSCRIPT
public static HtmlTree NOSCRIPT(Content body)
Deprecated.Generates a NOSCRIPT tag with some content.- Parameters:
body
- content of the noscript tag- Returns:
- an HtmlTree object for the NOSCRIPT tag
-
P
public static HtmlTree P(Content body)
Deprecated.Generates a P tag with some content.- Parameters:
body
- content of the Paragraph tag- Returns:
- an HtmlTree object for the P tag
-
P
public static HtmlTree P(HtmlStyle styleClass, Content body)
Deprecated.Generates a P tag with some content.- Parameters:
styleClass
- style of the Paragraph tagbody
- content of the Paragraph tag- Returns:
- an HtmlTree object for the P tag
-
SCRIPT
public static HtmlTree SCRIPT(String src)
Deprecated.Generates a SCRIPT tag with the type and src attributes.- Parameters:
type
- type of linksrc
- the path for the script- Returns:
- an HtmlTree object for the SCRIPT tag
-
SCRIPT
public static HtmlTree SCRIPT()
Deprecated.Generates a SCRIPT tag with the type attribute.- Returns:
- an HtmlTree object for the SCRIPT tag
-
SECTION
public static HtmlTree SECTION()
Deprecated.Generates a SECTION tag with role attribute.- Returns:
- an HtmlTree object for the SECTION tag
-
SECTION
public static HtmlTree SECTION(Content body)
Deprecated.Generates a SECTION tag with role attribute and some content.- Parameters:
body
- content of the section tag- Returns:
- an HtmlTree object for the SECTION tag
-
SMALL
public static HtmlTree SMALL(Content body)
Deprecated.Generates a SMALL tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the SMALL tag
-
SPAN
public static HtmlTree SPAN(Content body)
Deprecated.Generates a SPAN tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the SPAN tag
-
SPAN
public static HtmlTree SPAN(HtmlStyle styleClass, Content body)
Deprecated.Generates a SPAN tag with style class attribute and some content.- Parameters:
styleClass
- style class for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the SPAN tag
-
SPAN
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body)
Deprecated.Generates a SPAN tag with id and style class attributes. It also encloses a content.- Parameters:
id
- the id for the tagstyleClass
- stylesheet class for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the SPAN tag
-
TABLE
public static HtmlTree TABLE(HtmlStyle styleClass, String summary, Content body)
Deprecated.Generates a Table tag with style class and summary attributes and some content.- Parameters:
styleClass
- style of the tablesummary
- summary for the tablebody
- content for the table- Returns:
- an HtmlTree object for the TABLE tag
-
TABLE
public static HtmlTree TABLE(HtmlStyle styleClass, Content body)
Deprecated.Generates a Table tag with style class attribute and some content.- Parameters:
styleClass
- style of the tablebody
- content for the table- Returns:
- an HtmlTree object for the TABLE tag
-
TD
public static HtmlTree TD(HtmlStyle styleClass, Content body)
Deprecated.Generates a TD tag with style class attribute and some content.- Parameters:
styleClass
- style for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the TD tag
-
TD
public static HtmlTree TD(Content body)
Deprecated.Generates a TD tag for an HTML table with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the TD tag
-
TH
public static HtmlTree TH(HtmlStyle styleClass, String scope, Content body)
Deprecated.Generates a TH tag with style class and scope attributes and some content.- Parameters:
styleClass
- style for the tagscope
- scope of the tagbody
- content for the tag- Returns:
- an HtmlTree object for the TH tag
-
TH
public static HtmlTree TH(String scope, Content body)
Deprecated.Generates a TH tag with scope attribute and some content.- Parameters:
scope
- scope of the tagbody
- content for the tag- Returns:
- an HtmlTree object for the TH tag
-
TITLE
public static HtmlTree TITLE(Content body)
Deprecated.Generates a TITLE tag with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the TITLE tag
-
TR
public static HtmlTree TR(Content body)
Deprecated.Generates a TR tag for an HTML table with some content.- Parameters:
body
- content for the tag- Returns:
- an HtmlTree object for the TR tag
-
UL
public static HtmlTree UL(HtmlStyle styleClass, Content body)
Deprecated.Generates a UL tag with the style class attribute and some content.- Parameters:
styleClass
- style for the tagbody
- content for the tag- Returns:
- an HtmlTree object for the UL tag
-
isEmpty
public boolean isEmpty()
Deprecated.Returns true if the content is empty.
-
hasContent
public boolean hasContent()
Deprecated.Returns true if the HTML tree has content.- Returns:
- true if the HTML tree has content else return false
-
hasAttrs
public boolean hasAttrs()
Deprecated.Returns true if the HTML tree has attributes.- Returns:
- true if the HTML tree has attributes else return false
-
hasAttr
public boolean hasAttr(HtmlAttr attrName)
Deprecated.Returns true if the HTML tree has a specific attribute.- Parameters:
attrName
- name of the attribute to check within the HTML tree- Returns:
- true if the HTML tree has the specified attribute else return false
-
isValid
public boolean isValid()
Deprecated.Returns true if the HTML tree is valid. This check is more specific to standard doclet and not exactly similar to W3C specifications. But it ensures HTML validation.
-
isInline
public boolean isInline()
Deprecated.Returns true if the element is an inline element.- Returns:
- true if the HTML tag is an inline element
-
write
public boolean write(Writer out, boolean atNewline) throws IOException
Deprecated.Writes content to a writer.- Specified by:
write
in classContent
- Throws:
IOException
-
-