|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.AbstractWriter | +--javax.swing.text.html.HTMLWriter
This is a writer for HTMLDocuments.
Fields inherited from class javax.swing.text.AbstractWriter |
NEWLINE |
Constructor Summary | |
HTMLWriter(Writer w,
HTMLDocument doc)
Creates a new HTMLWriter. |
|
HTMLWriter(Writer w,
HTMLDocument doc,
int pos,
int len)
Creates a new HTMLWriter. |
Method Summary | |
protected void |
closeOutUnwantedEmbeddedTags(AttributeSet attr)
This method searches the attribute set and for each tag that is stored in the tag vector. |
protected void |
comment(Element elem)
Writes out comments. |
protected void |
emptyTag(Element elem)
Writes out all empty elements i.e tags that have no corresponding end tag. |
protected void |
endTag(Element elem)
Writes out an end tag for the element. |
protected boolean |
isBlockTag(AttributeSet attr)
Determines if the HTML.Tag associated with the element is a block tag. |
protected boolean |
matchNameAttribute(AttributeSet attr,
HTML.Tag tag)
This method return true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter. |
protected void |
selectContent(AttributeSet attr)
Writes out the content of the SELECT form element. |
protected void |
startTag(Element elem)
Writes out a start tag for the element. |
protected boolean |
synthesizedElement(Element elem)
This method returns true, if the element is a synthesized element. |
protected void |
text(Element elem)
Writes out text. |
protected void |
textAreaContent(AttributeSet attr)
Writes out text that is contained in a TEXTAREA form element. |
void |
write()
This is method that iterates over the the Element tree and controls the writing out of all the tags and its attributes. |
protected void |
write(String content)
Writes out a string. |
protected void |
writeAttributes(AttributeSet attr)
Writes out the attribute set. |
protected void |
writeEmbeddedTags(AttributeSet attr)
This method searches for embedded tags in the AttributeSet and writes them out. |
protected void |
writeOption(Option option)
Writes out the content of the Option form element. |
Methods inherited from class javax.swing.text.AbstractWriter |
decrIndent,
getDocument,
getElementIterator,
getText,
incrIndent,
indent,
inRange,
setIndentSpace,
setLineLength,
write |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HTMLWriter(Writer w, HTMLDocument doc)
a
- Writeran
- HTMLDocumentpublic HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)
a
- Writeran
- HTMLDocumentpos
- The location in the document to fetch the
content.len
- The amount to write out.Method Detail |
public void write() throws IOException, BadLocationException
protected void writeAttributes(AttributeSet attr) throws IOException
an
- AttributeSet.protected void emptyTag(Element elem) throws BadLocationException, IOException
an
- Element.protected boolean isBlockTag(AttributeSet attr)
AttributeSet.
- protected void startTag(Element elem) throws IOException, BadLocationException
an
- Element.protected void textAreaContent(AttributeSet attr) throws BadLocationException, IOException
AttributeSet
- protected void text(Element elem) throws BadLocationException, IOException
an
- Element.protected void write(String content) throws IOException
String
- representing the content.protected void selectContent(AttributeSet attr) throws IOException
AttributeSet
- associcated with the form element.protected void writeOption(Option option) throws IOException
Option.
- protected void endTag(Element elem) throws IOException
an
- Element.protected void comment(Element elem) throws BadLocationException, IOException
an
- element.protected boolean synthesizedElement(Element elem)
protected boolean matchNameAttribute(AttributeSet attr, HTML.Tag tag)
protected void writeEmbeddedTags(AttributeSet attr) throws IOException
protected void closeOutUnwantedEmbeddedTags(AttributeSet attr) throws IOException
|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |