java.lang.Object | ||
↳ | javax.swing.text.AbstractWriter | |
↳ | javax.swing.text.html.HTMLWriter |
This is a writer for HTMLDocuments.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new HTMLWriter.
| |||||||||||
Creates a new HTMLWriter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Iterates over the
Element tree and controls the writing out of
all the tags and its attributes.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Searches the attribute set and for each tag
that is stored in the tag vector.
| |||||||||||
Writes out comments.
| |||||||||||
Writes out all empty elements (all tags that have no
corresponding end tag).
| |||||||||||
Writes out an end tag for the element.
| |||||||||||
Determines if the HTML.Tag associated with the
element is a block tag.
| |||||||||||
Returns true if the StyleConstants.NameAttribute is
equal to the tag that is passed in as a parameter.
| |||||||||||
This method is overriden to map any character entities, such as
< to <.
| |||||||||||
Writes out the content of the SELECT form element.
| |||||||||||
Writes out a start tag for the element.
| |||||||||||
Returns true if the element is a
synthesized element.
| |||||||||||
Writes out text.
| |||||||||||
Writes out text that is contained in a TEXTAREA form
element.
| |||||||||||
Writes out the attribute set.
| |||||||||||
Searches for embedded tags in the AttributeSet
and writes them out.
| |||||||||||
Writes the line separator.
| |||||||||||
Writes out the content of the Option form element.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new HTMLWriter.
w | a Writer |
---|---|
doc | an HTMLDocument |
Creates a new HTMLWriter.
w | a Writer |
---|---|
doc | an HTMLDocument |
pos | the document location from which to fetch the content |
len | the amount to write out |
Iterates over the Element tree and controls the writing out of all the tags and its attributes.
IOException | on any I/O error |
---|---|
BadLocationException | if pos represents an invalid location within the document. |
Searches the attribute set and for each tag that is stored in the tag vector. If the tag isnt found, then the tag is removed from the vector and a corresponding end tag is written out.
IOException | on any I/O error |
---|
Writes out comments.
elem | an Element |
---|
IOException | on any I/O error |
---|---|
BadLocationException | if pos represents an invalid location within the document. |
Writes out all empty elements (all tags that have no corresponding end tag).
elem | an Element |
---|
IOException | on any I/O error |
---|---|
BadLocationException | if pos represents an invalid location within the document. |
Writes out an end tag for the element.
elem | an Element |
---|
IOException | on any I/O error |
---|
Determines if the HTML.Tag associated with the element is a block tag.
attr | an AttributeSet |
---|
Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter.
This method is overriden to map any character entities, such as
< to <. super.output
will be invoked to
write the content.
IOException |
---|
Writes out the content of the SELECT form element.
attr | the AttributeSet associated with the form element |
---|
IOException | on any I/O error |
---|
Writes out a start tag for the element. Ignores all synthesized elements.
elem | an Element |
---|
IOException | on any I/O error |
---|---|
BadLocationException |
Returns true if the element is a synthesized element. Currently we are only testing for the p-implied tag.
Writes out text. If a range is specified when the constructor is invoked, then only the appropriate range of text is written out.
elem | an Element |
---|
IOException | on any I/O error |
---|---|
BadLocationException | if pos represents an invalid location within the document. |
Writes out text that is contained in a TEXTAREA form element.
attr | an AttributeSet |
---|
IOException | on any I/O error |
---|---|
BadLocationException | if pos represents an invalid location within the document. |
Writes out the attribute set. Ignores all attributes with a key of type HTML.Tag, attributes with a key of type StyleConstants, and attributes with a key of type HTML.Attribute.ENDTAG.
attr | an AttributeSet |
---|
IOException | on any I/O error |
---|
Searches for embedded tags in the AttributeSet and writes them out. It also stores these tags in a vector so that when appropriate the corresponding end tags can be written out.
IOException | on any I/O error |
---|
Writes the line separator. This is overriden to make sure we don't replace the newline content in case it is outside normal ascii.
IOException |
---|
Writes out the content of the Option form element.
option | an Option |
---|
IOException | on any I/O error |
---|