MinimalHTMLWriter (Java Platform SE 6) (original) (raw)
javax.swing.text.html
Class MinimalHTMLWriter
java.lang.Object
javax.swing.text.AbstractWriter
javax.swing.text.html.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 of the style attribute of a tag.** **The syntax is similar to inline styles.**
Field Summary |
---|
Fields inherited from class javax.swing.text.AbstractWriter |
---|
NEWLINE |
Constructor Summary |
---|
[MinimalHTMLWriter](../../../../javax/swing/text/html/MinimalHTMLWriter.html#MinimalHTMLWriter%28java.io.Writer, javax.swing.text.StyledDocument%29)(Writer w,StyledDocument doc) Creates a new MinimalHTMLWriter. |
[MinimalHTMLWriter](../../../../javax/swing/text/html/MinimalHTMLWriter.html#MinimalHTMLWriter%28java.io.Writer, javax.swing.text.StyledDocument, int, int%29)(Writer w,StyledDocument doc, int pos, int len) Creates a new MinimalHTMLWriter. |
Method Summary | |
---|---|
protected void | endFontTag() This is no longer used, instead will be written out. |
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) This is no longer used, instead will be written out. |
protected void | text(Element elem) Writes out text. |
void | write() Generates HTML output from a StyledDocument. |
protected void | writeAttributes(AttributeSet attr) Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants. |
protected void | writeBody() 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; deliberately unimplemented. |
protected void | [writeContent](../../../../javax/swing/text/html/MinimalHTMLWriter.html#writeContent%28javax.swing.text.Element, boolean%29)(Element elem, boolean needsIndenting) Writes out the attribute set in an HTML-compliant manner. |
protected void | writeEndParagraph() Emits an end tag for a tag. |
protected void | writeEndTag(String endTag) Writes out an end tag appropriately indented. |
protected void | writeHeader() Writes out the and |