|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.swing.text.AbstractWriter
![]()
![]()
![]()
javax.swing.text.html.HTMLWriter
public class HTMLWriter

This is a writer for HTMLDocuments.
| Field Summary |
|---|
Fields inherited from class javax.swing.text.AbstractWriter ![]() |
|---|
NEWLINE |
| Constructor Summary | |
|---|---|
HTMLWriter
Creates a new HTMLWriter. |
|
HTMLWriter
Creates a new HTMLWriter. |
|
| Method Summary | |
|---|---|
protected void |
closeOutUnwantedEmbeddedTags
Searches the attribute set and for each tag that is stored in the tag vector. |
protected void |
comment
Writes out comments. |
protected void |
emptyTag
Writes out all empty elements (all tags that have no corresponding end tag). |
protected void |
endTag
Writes out an end tag for the element. |
protected boolean |
isBlockTag
Determines if the HTML.Tag associated with the element is a block tag. |
protected boolean |
matchNameAttribute
Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter. |
protected void |
output
This method is overriden to map any character entities, such as < to <. |
protected void |
selectContent
Writes out the content of the SELECT form element. |
protected void |
startTag
Writes out a start tag for the element. |
protected boolean |
synthesizedElement
Returns true if the element is a synthesized element. |
protected void |
text
Writes out text. |
protected void |
textAreaContent
Writes out text that is contained in a TEXTAREA form element. |
void |
write
Iterates over the Element tree and controls the writing out of all the tags and its attributes. |
protected void |
writeAttributes
Writes out the attribute set. |
protected void |
writeEmbeddedTags
Searches for embedded tags in the AttributeSet and writes them out. |
protected void |
writeLineSeparator
Writes the line separator. |
protected void |
writeOption
Writes out the content of the Option form element. |
Methods inherited from class javax.swing.text.AbstractWriter ![]() |
|---|
decrIndent |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Constructor Detail |
|---|

public HTMLWriter(Writer![]()
![]()
w, HTMLDocument
![]()
![]()
doc)
w - a Writerdoc - an HTMLDocument

public HTMLWriter(Writer![]()
![]()
w, HTMLDocument
![]()
![]()
doc, int pos, int len)
w - a Writerdoc - an HTMLDocumentpos - the document location from which to fetch the contentlen - the amount to write out| Method Detail |
|---|

public void write()
throws IOException
,
BadLocationException

write

in class AbstractWriter

IOException

- on any I/O error
BadLocationException

- if pos represents an invalid
location within the document.

protected void writeAttributes(AttributeSet![]()
![]()
attr) throws IOException
![]()
![]()
writeAttributes

in class AbstractWriter

attr - an AttributeSet
IOException

- on any I/O error

protected void emptyTag(Element![]()
![]()
elem) throws BadLocationException
![]()
![]()
, IOException
![]()
![]()
elem - an Element
IOException

- on any I/O error
BadLocationException

- if pos represents an invalid
location within the document.

protected boolean isBlockTag(AttributeSet![]()
![]()
attr)
attr - an AttributeSet

protected void startTag(Element![]()
![]()
elem) throws IOException
![]()
![]()
, BadLocationException
![]()
![]()
elem - an Element
IOException

- on any I/O error
BadLocationException


protected void textAreaContent(AttributeSet![]()
![]()
attr) throws BadLocationException
![]()
![]()
, IOException
![]()
![]()
attr - an AttributeSet
IOException

- on any I/O error
BadLocationException

- if pos represents an invalid
location within the document.

protected void text(Element![]()
![]()
elem) throws BadLocationException
![]()
![]()
, IOException
![]()
![]()
text

in class AbstractWriter

elem - an Element
IOException

- on any I/O error
BadLocationException

- if pos represents an invalid
location within the document.

protected void selectContent(AttributeSet![]()
![]()
attr) throws IOException
![]()
![]()
attr - the AttributeSet associated with the form element
IOException

- on any I/O error

protected void writeOption(Option![]()
![]()
option) throws IOException
![]()
![]()
option - an Option
IOException

- on any I/O error

protected void endTag(Element![]()
![]()
elem) throws IOException
![]()
![]()
elem - an Element
IOException

- on any I/O error

protected void comment(Element![]()
![]()
elem) throws BadLocationException
![]()
![]()
, IOException
![]()
![]()
elem - an Element
IOException

- on any I/O error
BadLocationException

- if pos represents an invalid
location within the document.

protected boolean synthesizedElement(Element![]()
![]()
elem)

protected boolean matchNameAttribute(AttributeSet![]()
![]()
attr, HTML.Tag
![]()
![]()
tag)

protected void writeEmbeddedTags(AttributeSet![]()
![]()
attr) throws IOException
![]()
![]()
IOException

- on any I/O error

protected void closeOutUnwantedEmbeddedTags(AttributeSet![]()
![]()
attr) throws