javax.swing.text.html
Class MinimalHTMLWriter

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter 
      extended by javax.swing.text.html.MinimalHTMLWriter

public class MinimalHTMLWriter
extends AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.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:

 <html>
   <head>
     <style>
        <!-- list of named styles
         p.normal {
            font-family: SansSerif;
              margin-height: 0;
              font-size: 14
           }
        -->
      </style>
   </head>
   <body>
    <p style=normal>
        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 <span> tag.
        The syntax is similar to inline styles.
    </p>
   </body>
 </html>
 


Field Summary
 
Fields inherited from class javax.swing.text.AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter
NEWLINE sample code for javax.swing.text.AbstractWriter.NEWLINE definition code for javax.swing.text.AbstractWriter.NEWLINE
 
Constructor Summary
MinimalHTMLWriter sample code for javax.swing.text.html.MinimalHTMLWriter.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument) definition code for javax.swing.text.html.MinimalHTMLWriter.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument) (Writer sample code for java.io.Writer definition code for java.io.Writer  w, StyledDocument sample code for javax.swing.text.StyledDocument definition code for javax.swing.text.StyledDocument  doc)
          Creates a new MinimalHTMLWriter.
MinimalHTMLWriter sample code for javax.swing.text.html.MinimalHTMLWriter.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int) definition code for javax.swing.text.html.MinimalHTMLWriter.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int) (Writer sample code for java.io.Writer definition code for java.io.Writer  w, StyledDocument sample code for javax.swing.text.StyledDocument definition code for javax.swing.text.StyledDocument  doc, int pos, int len)
          Creates a new MinimalHTMLWriter.
 
Method Summary
protected  void endFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.endFontTag() definition code for javax.swing.text.html.MinimalHTMLWriter.endFontTag() ()
          This is no longer used, instead <span> will be written out.
protected  boolean inFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.inFontTag() definition code for javax.swing.text.html.MinimalHTMLWriter.inFontTag() ()
          Returns true if we are currently in a <font> tag.
protected  boolean isText sample code for javax.swing.text.html.MinimalHTMLWriter.isText(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.isText(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Returns true if the element is a text element.
protected  void startFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.startFontTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.startFontTag(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  style)
          This is no longer used, instead <span> will be written out.
protected  void text sample code for javax.swing.text.html.MinimalHTMLWriter.text(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.text(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Writes out text.
 void write sample code for javax.swing.text.html.MinimalHTMLWriter.write() definition code for javax.swing.text.html.MinimalHTMLWriter.write() ()
          Generates HTML output from a StyledDocument.
protected  void writeAttributes sample code for javax.swing.text.html.MinimalHTMLWriter.writeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants.
protected  void writeBody sample code for javax.swing.text.html.MinimalHTMLWriter.writeBody() definition code for javax.swing.text.html.MinimalHTMLWriter.writeBody() ()
          Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements.
protected  void writeComponent sample code for javax.swing.text.html.MinimalHTMLWriter.writeComponent(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeComponent(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Responsible for handling Component Elements; deliberately unimplemented.
protected  void writeContent sample code for javax.swing.text.html.MinimalHTMLWriter.writeContent(javax.swing.text.Element, boolean) definition code for javax.swing.text.html.MinimalHTMLWriter.writeContent(javax.swing.text.Element, boolean) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem, boolean needsIndenting)
          Writes out the attribute set in an HTML-compliant manner.
protected  void writeEndParagraph sample code for javax.swing.text.html.MinimalHTMLWriter.writeEndParagraph() definition code for javax.swing.text.html.MinimalHTMLWriter.writeEndParagraph() ()
          Emits an end tag for a <p> tag.
protected  void writeEndTag sample code for javax.swing.text.html.MinimalHTMLWriter.writeEndTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.writeEndTag(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  endTag)
          Writes out an end tag appropriately indented.
protected  void writeHeader sample code for javax.swing.text.html.MinimalHTMLWriter.writeHeader() definition code for javax.swing.text.html.MinimalHTMLWriter.writeHeader() ()
          Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag.
protected  void writeHTMLTags sample code for javax.swing.text.html.MinimalHTMLWriter.writeHTMLTags(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeHTMLTags(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.
protected  void writeImage sample code for javax.swing.text.html.MinimalHTMLWriter.writeImage(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeImage(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Responsible for handling Icon Elements; deliberately unimplemented.
protected  void writeLeaf sample code for javax.swing.text.html.MinimalHTMLWriter.writeLeaf(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeLeaf(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Responsible for writing out other non-text leaf elements.
protected  void writeNonHTMLAttributes sample code for javax.swing.text.html.MinimalHTMLWriter.writeNonHTMLAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeNonHTMLAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.
protected  void writeStartParagraph sample code for javax.swing.text.html.MinimalHTMLWriter.writeStartParagraph(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeStartParagraph(javax.swing.text.Element) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
          Emits the start tag for a paragraph.
protected  void writeStartTag sample code for javax.swing.text.html.MinimalHTMLWriter.writeStartTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.writeStartTag(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  tag)
          Writes out a start tag appropriately indented.
protected  void writeStyles sample code for javax.swing.text.html.MinimalHTMLWriter.writeStyles() definition code for javax.swing.text.html.MinimalHTMLWriter.writeStyles() ()
          Writes out all the named styles as the content of the <style> tag.
 
Methods inherited from class javax.swing.text.AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter
decrIndent sample code for javax.swing.text.AbstractWriter.decrIndent() definition code for javax.swing.text.AbstractWriter.decrIndent() , getCanWrapLines sample code for javax.swing.text.AbstractWriter.getCanWrapLines() definition code for javax.swing.text.AbstractWriter.getCanWrapLines() , getCurrentLineLength sample code for javax.swing.text.AbstractWriter.getCurrentLineLength() definition code for javax.swing.text.AbstractWriter.getCurrentLineLength() , getDocument sample code for javax.swing.text.AbstractWriter.getDocument() definition code for javax.swing.text.AbstractWriter.getDocument() , getElementIterator sample code for javax.swing.text.AbstractWriter.getElementIterator() definition code for javax.swing.text.AbstractWriter.getElementIterator() , getEndOffset sample code for javax.swing.text.AbstractWriter.getEndOffset() definition code for javax.swing.text.AbstractWriter.getEndOffset() , getIndentLevel sample code for javax.swing.text.AbstractWriter.getIndentLevel() definition code for javax.swing.text.AbstractWriter.getIndentLevel() , getIndentSpace sample code for javax.swing.text.AbstractWriter.getIndentSpace() definition code for javax.swing.text.AbstractWriter.getIndentSpace() , getLineLength sample code for javax.swing.text.AbstractWriter.getLineLength() definition code for javax.swing.text.AbstractWriter.getLineLength() , getLineSeparator sample code for javax.swing.text.AbstractWriter.getLineSeparator() definition code for javax.swing.text.AbstractWriter.getLineSeparator() , getStartOffset sample code for javax.swing.text.AbstractWriter.getStartOffset() definition code for javax.swing.text.AbstractWriter.getStartOffset() , getText sample code for javax.swing.text.AbstractWriter.getText(javax.swing.text.Element) definition code for javax.swing.text.AbstractWriter.getText(javax.swing.text.Element) , getWriter sample code for javax.swing.text.AbstractWriter.getWriter() definition code for javax.swing.text.AbstractWriter.getWriter() , incrIndent sample code for javax.swing.text.AbstractWriter.incrIndent() definition code for javax.swing.text.AbstractWriter.incrIndent() , indent sample code for javax.swing.text.AbstractWriter.indent() definition code for javax.swing.text.AbstractWriter.indent() , inRange sample code for javax.swing.text.AbstractWriter.inRange(javax.swing.text.Element) definition code for javax.swing.text.AbstractWriter.inRange(javax.swing.text.Element) , isLineEmpty sample code for javax.swing.text.AbstractWriter.isLineEmpty() definition code for javax.swing.text.AbstractWriter.isLineEmpty() , output sample code for javax.swing.text.AbstractWriter.output(char[], int, int) definition code for javax.swing.text.AbstractWriter.output(char[], int, int) , setCanWrapLines sample code for javax.swing.text.AbstractWriter.setCanWrapLines(boolean) definition code for javax.swing.text.AbstractWriter.setCanWrapLines(boolean) , setCurrentLineLength sample code for javax.swing.text.AbstractWriter.setCurrentLineLength(int) definition code for javax.swing.text.AbstractWriter.setCurrentLineLength(int) , setIndentSpace sample code for javax.swing.text.AbstractWriter.setIndentSpace(int) definition code for javax.swing.text.AbstractWriter.setIndentSpace(int) , setLineLength sample code for javax.swing.text.AbstractWriter.setLineLength(int) definition code for javax.swing.text.AbstractWriter.setLineLength(int) , setLineSeparator sample code for javax.swing.text.AbstractWriter.setLineSeparator(java.lang.String) definition code for javax.swing.text.AbstractWriter.setLineSeparator(java.lang.String) , write sample code for javax.swing.text.AbstractWriter.write(char) definition code for javax.swing.text.AbstractWriter.write(char) , write sample code for javax.swing.text.AbstractWriter.write(char[], int, int) definition code for javax.swing.text.AbstractWriter.write(char[], int, int) , write sample code for javax.swing.text.AbstractWriter.write(java.lang.String) definition code for javax.swing.text.AbstractWriter.write(java.lang.String) , writeLineSeparator sample code for javax.swing.text.AbstractWriter.writeLineSeparator() definition code for javax.swing.text.AbstractWriter.writeLineSeparator()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

MinimalHTMLWriter sample code for javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument) definition code for javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument)

public MinimalHTMLWriter(Writer sample code for java.io.Writer definition code for java.io.Writer  w,
                         StyledDocument sample code for javax.swing.text.StyledDocument definition code for javax.swing.text.StyledDocument  doc)
Creates a new MinimalHTMLWriter.

Parameters:
w - Writer
doc - StyledDocument

MinimalHTMLWriter sample code for javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int) definition code for javax.swing.text.html.MinimalHTMLWriter(java.io.Writer, javax.swing.text.StyledDocument, int, int)

public MinimalHTMLWriter(Writer sample code for java.io.Writer definition code for java.io.Writer  w,
                         StyledDocument sample code for javax.swing.text.StyledDocument definition code for javax.swing.text.StyledDocument  doc,
                         int pos,
                         int len)
Creates a new MinimalHTMLWriter.

Parameters:
w - Writer
doc - StyledDocument
pos - The location in the document to fetch the content.
len - The amount to write out.
Method Detail

write sample code for javax.swing.text.html.MinimalHTMLWriter.write() definition code for javax.swing.text.html.MinimalHTMLWriter.write()

public void write()
           throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                  BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Generates HTML output from a StyledDocument.

Specified by:
write sample code for javax.swing.text.AbstractWriter.write() definition code for javax.swing.text.AbstractWriter.write() in class AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

writeAttributes sample code for javax.swing.text.html.MinimalHTMLWriter.writeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeAttributes(javax.swing.text.AttributeSet)

protected void writeAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
                        throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out all the attributes for the following types: StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants. The attribute name and value are separated by a colon. Each pair is separated by a semicolon.

Overrides:
writeAttributes sample code for javax.swing.text.AbstractWriter.writeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractWriter.writeAttributes(javax.swing.text.AttributeSet) in class AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter
Parameters:
attr - an AttributeSet.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

text sample code for javax.swing.text.html.MinimalHTMLWriter.text(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.text(javax.swing.text.Element)

protected void text(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
             throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                    BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Writes out text.

Overrides:
text sample code for javax.swing.text.AbstractWriter.text(javax.swing.text.Element) definition code for javax.swing.text.AbstractWriter.text(javax.swing.text.Element) in class AbstractWriter sample code for javax.swing.text.AbstractWriter definition code for javax.swing.text.AbstractWriter
Parameters:
elem - an Element.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

writeStartTag sample code for javax.swing.text.html.MinimalHTMLWriter.writeStartTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.writeStartTag(java.lang.String)

protected void writeStartTag(String sample code for java.lang.String definition code for java.lang.String  tag)
                      throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out a start tag appropriately indented. Also increments the indent level.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeEndTag sample code for javax.swing.text.html.MinimalHTMLWriter.writeEndTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.writeEndTag(java.lang.String)

protected void writeEndTag(String sample code for java.lang.String definition code for java.lang.String  endTag)
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out an end tag appropriately indented. Also decrements the indent level.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeHeader sample code for javax.swing.text.html.MinimalHTMLWriter.writeHeader() definition code for javax.swing.text.html.MinimalHTMLWriter.writeHeader()

protected void writeHeader()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out the <head> and <style> tags, and then invokes writeStyles() to write out all the named styles as the content of the <style> tag. The content is surrounded by valid HTML comment markers to ensure that the document is viewable in applications/browsers that do not support the tag.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeStyles sample code for javax.swing.text.html.MinimalHTMLWriter.writeStyles() definition code for javax.swing.text.html.MinimalHTMLWriter.writeStyles()

protected void writeStyles()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out all the named styles as the content of the <style> tag.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeBody sample code for javax.swing.text.html.MinimalHTMLWriter.writeBody() definition code for javax.swing.text.html.MinimalHTMLWriter.writeBody()

protected void writeBody()
                  throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                         BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Iterates over the elements in the document and processes elements based on whether they are branch elements or leaf elements. This method specially handles leaf elements that are text.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException

writeEndParagraph sample code for javax.swing.text.html.MinimalHTMLWriter.writeEndParagraph() definition code for javax.swing.text.html.MinimalHTMLWriter.writeEndParagraph()

protected void writeEndParagraph()
                          throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Emits an end tag for a <p> tag. Before writing out the tag, this method ensures that all other tags that have been opened are appropriately closed off.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeStartParagraph sample code for javax.swing.text.html.MinimalHTMLWriter.writeStartParagraph(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeStartParagraph(javax.swing.text.Element)

protected void writeStartParagraph(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Emits the start tag for a paragraph. If the paragraph has a named style associated with it, then this method also generates a class attribute for the <p> tag and sets its value to be the name of the style.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeLeaf sample code for javax.swing.text.html.MinimalHTMLWriter.writeLeaf(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeLeaf(javax.swing.text.Element)

protected void writeLeaf(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
                  throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Responsible for writing out other non-text leaf elements.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeImage sample code for javax.swing.text.html.MinimalHTMLWriter.writeImage(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeImage(javax.swing.text.Element)

protected void writeImage(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
                   throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Responsible for handling Icon Elements; deliberately unimplemented. How to implement this method is an issue of policy. For example, if you're generating an <img> tag, how should you represent the src attribute (the location of the image)? In certain cases it could be a URL, in others it could be read from a stream.

Parameters:
elem - element of type StyleConstants.IconElementName
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException

writeComponent sample code for javax.swing.text.html.MinimalHTMLWriter.writeComponent(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.writeComponent(javax.swing.text.Element)

protected void writeComponent(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
                       throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Responsible for handling Component Elements; deliberately unimplemented. How this method is implemented is a matter of policy.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException

isText sample code for javax.swing.text.html.MinimalHTMLWriter.isText(javax.swing.text.Element) definition code for javax.swing.text.html.MinimalHTMLWriter.isText(javax.swing.text.Element)

protected boolean isText(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem)
Returns true if the element is a text element.


writeContent sample code for javax.swing.text.html.MinimalHTMLWriter.writeContent(javax.swing.text.Element, boolean) definition code for javax.swing.text.html.MinimalHTMLWriter.writeContent(javax.swing.text.Element, boolean)

protected void writeContent(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem,
                            boolean needsIndenting)
                     throws IOException sample code for java.io.IOException definition code for java.io.IOException ,
                            BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Writes out the attribute set in an HTML-compliant manner.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - if pos represents an invalid location within the document.

writeHTMLTags sample code for javax.swing.text.html.MinimalHTMLWriter.writeHTMLTags(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeHTMLTags(javax.swing.text.AttributeSet)

protected void writeHTMLTags(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
                      throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Generates bold <b>, italic <i>, and <u> tags for the text based on its attribute settings.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

writeNonHTMLAttributes sample code for javax.swing.text.html.MinimalHTMLWriter.writeNonHTMLAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.html.MinimalHTMLWriter.writeNonHTMLAttributes(javax.swing.text.AttributeSet)

protected void writeNonHTMLAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
                               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way. Given that attributes such as font family and font size have no direct mapping to HTML tags, a <span> tag is generated and its style attribute is set to contain the list of remaining attributes just like inline styles.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

inFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.inFontTag() definition code for javax.swing.text.html.MinimalHTMLWriter.inFontTag()

protected boolean inFontTag()
Returns true if we are currently in a <font> tag.


endFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.endFontTag() definition code for javax.swing.text.html.MinimalHTMLWriter.endFontTag()

protected void endFontTag()
                   throws IOException sample code for java.io.IOException definition code for java.io.IOException 
This is no longer used, instead <span> will be written out.

Writes out an end tag for the <font> tag.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error

startFontTag sample code for javax.swing.text.html.MinimalHTMLWriter.startFontTag(java.lang.String) definition code for javax.swing.text.html.MinimalHTMLWriter.startFontTag(java.lang.String)

protected void startFontTag(String sample code for java.lang.String definition code for java.lang.String  style)
                     throws IOException sample code for java.io.IOException definition code for java.io.IOException 
This is no longer used, instead <span> will be written out.

Writes out a start tag for the <font> tag. Because font tags cannot be nested, this method closes out any enclosing font tag before writing out a new start tag.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - on any I/O error