|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.text.AbstractWriter
javax.swing.text.html.HTMLWriter
public class HTMLWriter
这是用于 HTMLDocuments 的 writer。
| 字段摘要 |
|---|
| 从类 javax.swing.text.AbstractWriter 继承的字段 |
|---|
NEWLINE |
| 构造方法摘要 | |
|---|---|
HTMLWriter(Writer w,
HTMLDocument doc)
创建新的 HTMLWriter。 |
|
HTMLWriter(Writer w,
HTMLDocument doc,
int pos,
int len)
创建新的 HTMLWriter。 |
|
| 方法摘要 | |
|---|---|
protected void |
closeOutUnwantedEmbeddedTags(AttributeSet attr)
搜索属性集和存储在标记向量中的每个标记。 |
protected void |
comment(Element elem)
写出注释。 |
protected void |
emptyTag(Element elem)
写出所有空元素(没有对应结束标记的所有标记)。 |
protected void |
endTag(Element elem)
写出元素的结束标记。 |
protected boolean |
isBlockTag(AttributeSet attr)
确定与该元素关联的 HTML.Tag 是否为块标记。 |
protected boolean |
matchNameAttribute(AttributeSet attr,
HTML.Tag tag)
如果 StyleConstants.NameAttribute 与作为参数传入的标记相同,则返回 true。 |
protected void |
output(char[] chars,
int start,
int length)
重写此方法来映射任何字符实体,例如 < 映射到 <。 |
protected void |
selectContent(AttributeSet attr)
写出 SELECT 表单元素的内容。 |
protected void |
startTag(Element elem)
写出元素的开始标记。 |
protected boolean |
synthesizedElement(Element elem)
如果元素是合成元素,则返回 true。 |
protected void |
text(Element elem)
写出文本。 |
protected void |
textAreaContent(AttributeSet attr)
写出 TEXTAREA 表单元素中所包含的文本。 |
void |
write()
对 Element 树进行迭代并控制所有标记及其属性的写出。 |
protected void |
writeAttributes(AttributeSet attr)
写出属性集。 |
protected void |
writeEmbeddedTags(AttributeSet attr)
搜索 AttributeSet 中的嵌入式标记并写出它们。 |
protected void |
writeLineSeparator()
写出行分隔符。 |
protected void |
writeOption(Option option)
写出 Option 表单元素的内容。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public HTMLWriter(Writer w,
HTMLDocument doc)
w - Writerdoc - HTMLDocument
public HTMLWriter(Writer w,
HTMLDocument doc,
int pos,
int len)
w - Writerdoc - HTMLDocumentpos - 文档位置,从此位置获取内容len - 写出量| 方法详细信息 |
|---|
public void write()
throws IOException,
BadLocationException
AbstractWriter 中的 writeIOException - 如果发生任何 I/O 错误
BadLocationException - 如果 pos 表示文档中的无效位置。
protected void writeAttributes(AttributeSet attr)
throws IOException
AbstractWriter 中的 writeAttributesattr - AttributeSet
IOException - 如果发生任何 I/O 错误
protected void emptyTag(Element elem)
throws BadLocationException,
IOException
elem - Element
IOException - 如果发生任何 I/O 错误
BadLocationException - 如果 pos 表示文档中的无效位置。protected boolean isBlockTag(AttributeSet attr)
attr - AttributeSet
protected void startTag(Element elem)
throws IOException,
BadLocationException
elem - Element
IOException - 如果发生任何 I/O 错误
BadLocationException
protected void textAreaContent(AttributeSet attr)
throws BadLocationException,
IOException
attr - AttributeSet
IOException - 如果发生任何 I/O 错误
BadLocationException - 如果 pos 表示文档中的无效位置。
protected void text(Element elem)
throws BadLocationException,
IOException
AbstractWriter 中的 textelem - Element
IOException - 如果发生任何 I/O 错误
BadLocationException - 如果 pos 表示文档中的无效位置。
protected void selectContent(AttributeSet attr)
throws IOException
attr - 与表单元素关联的 AttributeSet
IOException - 如果发生任何 I/O 错误
protected void writeOption(Option option)
throws IOException
option - Option
IOException - 如果发生任何 I/O 错误
protected void endTag(Element elem)
throws IOException
elem - Element
IOException - 如果发生任何 I/O 错误
protected void comment(Element elem)
throws BadLocationException,
IOException
elem - Element
IOException - 如果发生任何 I/O 错误
BadLocationException - 如果 pos 表示文档中的无效位置。protected boolean synthesizedElement(Element elem)
protected boolean matchNameAttribute(AttributeSet attr,
HTML.Tag tag)
protected void writeEmbeddedTags(AttributeSet attr)
throws IOException
IOException - 如果发生任何 I/O 错误
protected void closeOutUnwantedEmbeddedTags(AttributeSet attr)
throws IOException
IOException - 如果发生任何 I/O 错误
protected void writeLineSeparator()
throws IOException
AbstractWriter 中的 writeLineSeparatorIOException
protected void output(char[] chars,
int start,
int length)
throws IOException
super.output 可写出内容。
AbstractWriter 中的 outputIOException
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。