Java Platform 1.2

Class MinimalHTMLWriter


public class MinimalHTMLWriter
extends AbstractWriter

MinimalHTMLWriter is a fallback writer used by the HTMLEditorKit to write out HTML for a document that is a not produced by the EditorKit. The format for the document is:

bold, italic and underline attributes of the run are emitted as html tags. The remaining attributes are emitted as part style attribute of a tag. The syntax is similar to inline styles.

Fields inherited from class javax.swing.text.AbstractWriter
Constructor Summary
MinimalHTMLWriter(Writer w, StyledDocument doc)
          Creates a new MinimalHTMLWriter.
MinimalHTMLWriter(Writer w, StyledDocument doc, int pos, int len)
          Creates a new MinimalHTMLWriter.
Method Summary
protected  void endFontTag()
          Writes out an end tag for the tag.
protected  boolean inFontTag()
          Returns true if we are currently in a tag.
protected  boolean isText(Element elem)
          Returns true if the element is a text element.
protected  void startFontTag(String style)
          Writes out a start tag for the tag.
protected  void text(Element elem)
          This method is responsible for writing text out.
 void write()
          This method is responsible for generating html output from a StyledDocument.
protected  void writeAttributes(AttributeSet attr)
          This method writes out all the attributes that are for the following types: StyleConstants.ParagraphConstants StyleConstants.CharacterConstants StyleConstants.FontConstants StyleConstants.ColorConstants.
protected  void writeBody()
          This method iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
protected  void writeComponent(Element elem)
          Responsible for handling Component Elements.
protected  void writeContent(Element elem, boolean needsIndenting)
          This method handles writing out text.
protected  void writeEndParagraph()
          This method handles emiting an end tag for a tag.
protected  void writeEndTag(String endTag)
          This method writes out a end tag approrirately indented.
protected  void writeHeader()
          This method writes out the and