| |
|
| java.lang.Object javax.swing.text.AbstractWriter javax.swing.text.html.HTMLWriter
HTMLWriter | public class HTMLWriter extends AbstractWriter (Code) | | This is a writer for HTMLDocuments.
author: Sunita Mani version: 1.26, 02/02/00 |
HTMLWriter | public HTMLWriter(Writer w, HTMLDocument doc)(Code) | | Creates a new HTMLWriter.
Parameters: w - a Writer Parameters: doc - an HTMLDocument |
HTMLWriter | public HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)(Code) | | Creates a new HTMLWriter.
Parameters: w - a Writer Parameters: doc - an HTMLDocument Parameters: pos - the document location from which to fetch the content Parameters: len - the amount to write out |
closeOutUnwantedEmbeddedTags | protected void closeOutUnwantedEmbeddedTags(AttributeSet attr) throws IOException(Code) | | 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.
exception: IOException - on any I/O error |
convertToHTML | AttributeSet convertToHTML(AttributeSet from, MutableAttributeSet to)(Code) | | Convert the give set of attributes to be html for
the purpose of writing them out. Any keys that
have been converted will not appear in the resultant
set. Any keys not converted will appear in the
resultant set the same as the received set.
This will put the converted values into to , unless
it is null in which case a temporary AttributeSet will be returned.
|
endTag | protected void endTag(Element elem) throws IOException(Code) | | Writes out an end tag for the element.
Parameters: elem - an Element exception: IOException - on any I/O error |
isBlockTag | protected boolean isBlockTag(AttributeSet attr)(Code) | | Determines if the HTML.Tag associated with the
element is a block tag.
Parameters: attr - an AttributeSet true if tag is block tag, false otherwise. |
matchNameAttribute | protected boolean matchNameAttribute(AttributeSet attr, HTML.Tag tag)(Code) | | Returns true if the StyleConstants.NameAttribute is
equal to the tag that is passed in as a parameter.
|
output | protected void output(char[] chars, int start, int length) throws IOException(Code) | | This method is overriden to map any character entities, such as
< to <. super.output will be invoked to
write the content.
since: 1.3 |
selectContent | protected void selectContent(AttributeSet attr) throws IOException(Code) | | Writes out the content of the SELECT form element.
Parameters: attr - the AttributeSet associated with the form element exception: IOException - on any I/O error |
synthesizedElement | protected boolean synthesizedElement(Element elem)(Code) | | Returns true if the element is a
synthesized element. Currently we are only testing
for the p-implied tag.
|
text | protected void text(Element elem) throws BadLocationException, IOException(Code) | | Writes out text. If a range is specified when the constructor
is invoked, then only the appropriate range of text is written
out.
Parameters: elem - an Element exception: IOException - on any I/O error exception: BadLocationException - if pos represents an invalidlocation within the document. |
writeAdditionalComments | void writeAdditionalComments() throws IOException(Code) | | Writes out any additional comments (comments outside of the body)
stored under the property HTMLDocument.AdditionalComments.
|
writeAttributes | protected void writeAttributes(AttributeSet attr) throws IOException(Code) | | 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.
Parameters: attr - an AttributeSet exception: IOException - on any I/O error |
writeEmbeddedTags | protected void writeEmbeddedTags(AttributeSet attr) throws IOException(Code) | | 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.
exception: IOException - on any I/O error |
writeLineSeparator | protected void writeLineSeparator() throws IOException(Code) | | Writes the line separator. This is overriden to make sure we don't
replace the newline content in case it is outside normal ascii.
since: 1.3 |
writeMaps | void writeMaps(Enumeration maps) throws IOException(Code) | | Outputs the maps as elements. Maps are not stored as elements in
the document, and as such this is used to output them.
|
writeOption | protected void writeOption(Option option) throws IOException(Code) | | Writes out the content of the Option form element.
Parameters: option - an Option exception: IOException - on any I/O error |
writeStyle | boolean writeStyle(String name, Style style, boolean outputStyle) throws IOException(Code) | | Outputs the named style. outputStyle indicates
whether or not a style has been output yet. This will return
true if a style is written.
|
writeStyles | void writeStyles(StyleSheet sheet) throws IOException(Code) | | Outputs the styles as a single element. Styles are not stored as
elements, but part of the document. For the time being styles are
written out as a comment, inside a style tag.
|
Fields inherited from javax.swing.text.AbstractWriter | final protected static char NEWLINE(Code)(Java Doc)
|
|
|
|