sferyx.administration.renderers
Class XHTMLWriter
java.lang.Object
javax.swing.text.AbstractWriter
javax.swing.text.html.HTMLWriter
sferyx.administration.renderers.XHTMLWriter
- Direct Known Subclasses:
- InternalHTMLWriter, SimpleHTMLWriter
public class XHTMLWriter
- extends javax.swing.text.html.HTMLWriter
This is a simplified writer for EditorHTMLDocuments.
Fields inherited from class javax.swing.text.AbstractWriter |
NEWLINE |
Constructor Summary |
XHTMLWriter(java.io.Writer w,
javax.swing.text.html.HTMLDocument doc)
|
XHTMLWriter(java.io.Writer writer,
javax.swing.text.html.HTMLDocument doc,
int pos,
int len)
Creates a new SimpleHTMLWriter. |
Methods inherited from class javax.swing.text.html.HTMLWriter |
isBlockTag, matchNameAttribute, selectContent, write |
Methods inherited from class javax.swing.text.AbstractWriter |
decrIndent, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, isLineEmpty, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writeStrictXHTMLAttributes
public boolean writeStrictXHTMLAttributes
XHTMLWriter
public XHTMLWriter(java.io.Writer w,
javax.swing.text.html.HTMLDocument doc)
XHTMLWriter
public XHTMLWriter(java.io.Writer writer,
javax.swing.text.html.HTMLDocument doc,
int pos,
int len)
- Creates a new SimpleHTMLWriter.
- Parameters:
writer
- a Writerdoc
- an SimpleHTMLWriterpos
- the document location from which to fetch the contentlen
- the amount to write out
isReallyEmptyTag
public boolean isReallyEmptyTag(javax.swing.text.Element elem)
emptyTag
protected void emptyTag(javax.swing.text.Element elem)
throws javax.swing.text.BadLocationException,
java.io.IOException
- Overrides:
emptyTag
in class javax.swing.text.html.HTMLWriter
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
synthesizedElement
protected boolean synthesizedElement(javax.swing.text.Element elem)
- Overrides:
synthesizedElement
in class javax.swing.text.html.HTMLWriter
writeEmbeddedTags
public void writeEmbeddedTags(javax.swing.text.AttributeSet attr)
throws java.io.IOException
- Overrides:
writeEmbeddedTags
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
closeOutUnwantedEmbeddedTags
protected void closeOutUnwantedEmbeddedTags(javax.swing.text.AttributeSet attr)
throws java.io.IOException
- Overrides:
closeOutUnwantedEmbeddedTags
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
closeCustomTags
protected void closeCustomTags(javax.swing.text.AttributeSet attr)
throws java.io.IOException
- Throws:
java.io.IOException
isAdditionStyleDefinition
public static boolean isAdditionStyleDefinition(java.lang.Object key)
writeAttributes
public void writeAttributes(javax.swing.text.AttributeSet attr)
throws java.io.IOException
- Overrides:
writeAttributes
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
disableIndentingAndLineBreaks
public void disableIndentingAndLineBreaks(boolean disable)
isDisableIndentingAndLineBreaks
public boolean isDisableIndentingAndLineBreaks()
getCanWrapLines
protected boolean getCanWrapLines()
- Writes the line separator. This is overriden to make sure we don't
replace the newline content in case it is outside normal ascii.
- Overrides:
getCanWrapLines
in class javax.swing.text.AbstractWriter
writeLineSeparator
protected void writeLineSeparator()
throws java.io.IOException
- Overrides:
writeLineSeparator
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
indent
protected void indent()
throws java.io.IOException
- Overrides:
indent
in class javax.swing.text.AbstractWriter
- Throws:
java.io.IOException
startTag
protected void startTag(javax.swing.text.Element elem)
throws java.io.IOException,
javax.swing.text.BadLocationException
- Overrides:
startTag
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
writeImageMaps
public void writeImageMaps()
endTag
protected void endTag(javax.swing.text.Element elem)
throws java.io.IOException
- Overrides:
endTag
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
write
public void write(java.lang.String str)
throws java.io.IOException
- Overrides:
write
in class javax.swing.text.AbstractWriter
- Throws:
java.io.IOException
writeOption
protected void writeOption(javax.swing.text.html.Option option)
throws java.io.IOException
- Overrides:
writeOption
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
writeElementContent
public void writeElementContent(javax.swing.text.Element toWrite)
throws java.io.IOException,
javax.swing.text.BadLocationException
- Writes out the element content without including the element itself.
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
comment
protected void comment(javax.swing.text.Element elem)
throws javax.swing.text.BadLocationException,
java.io.IOException
- Overrides:
comment
in class javax.swing.text.html.HTMLWriter
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
write
public void write(javax.swing.text.Element toWrite)
throws java.io.IOException,
javax.swing.text.BadLocationException
- Writes the given element and all its content - child elements, etc.
- Throws:
java.io.IOException
javax.swing.text.BadLocationException
write
protected void write(char[] chars,
int startIndex,
int length)
throws java.io.IOException
- Overrides:
write
in class javax.swing.text.AbstractWriter
- Throws:
java.io.IOException
inRange
protected boolean inRange(javax.swing.text.Element next)
- Overrides:
inRange
in class javax.swing.text.AbstractWriter
output
protected void output(char[] chars,
int start,
int length)
throws java.io.IOException
- Overrides:
output
in class javax.swing.text.html.HTMLWriter
- Throws:
java.io.IOException
textAreaContent
protected void textAreaContent(javax.swing.text.AttributeSet attr)
throws javax.swing.text.BadLocationException,
java.io.IOException
- Overrides:
textAreaContent
in class javax.swing.text.html.HTMLWriter
- Throws:
javax.swing.text.BadLocationException
java.io.IOException
text
protected void text(javax.swing.text.Element elem)
throws javax.swing.text.BadLocationException,
java.io.IOException
- Overrides:
text
in class javax.swing.text.html.HTMLWriter
- Throws:
javax.swing.text.BadLocationException
java.io.IOException