|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。