|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.text.AbstractWriter
javax.swing.text.html.MinimalHTMLWriter
public class MinimalHTMLWriter
MinimalHTMLWriter は、エディタキットで作成されないドキュメントの HTML を書き出すために HTMLEditorKit が使用する代替ライターです。 ドキュメントの形式は次のとおりです。
<html>
<head>
<style>
<!-- list of named styles
p.normal {
font-family: SansSerif;
margin-height: 0;
font-size: 14
}
-->
</style>
</head>
<body>
<p style=normal>
実行ファイルのボールド、イタリック、および下線
の各属性は、HTML タグとして発行されます。
その他のタグは <span> タグの
一部として発行されます。
構文はインラインのスタイルと同様です。
</p>
</body>
</html>
| フィールドの概要 |
|---|
| クラス javax.swing.text.AbstractWriter から継承されたフィールド |
|---|
NEWLINE |
| コンストラクタの概要 | |
|---|---|
MinimalHTMLWriter(Writer w,
StyledDocument doc)
新しい MinimalHTMLWriter を作成します。 |
|
MinimalHTMLWriter(Writer w,
StyledDocument doc,
int pos,
int len)
新しい MinimalHTMLWriter を作成します。 |
|
| メソッドの概要 | |
|---|---|
protected void |
endFontTag()
現在使われていません。 |
protected boolean |
inFontTag()
<font> タグ内なら true を返します。 |
protected boolean |
isText(Element elem)
要素がテキストなら true を返します。 |
protected void |
startFontTag(String style)
現在使われていません。 |
protected void |
text(Element elem)
テキストを書き出します。 |
void |
write()
StyledDocument から HTML 出力を生成します。 |
protected void |
writeAttributes(AttributeSet attr)
次の型用のすべての属性を書き出します。 |
protected void |
writeBody()
ドキュメント内の要素で反復し、枝の要素か葉の要素かを判断して要素を処理します。 |
protected void |
writeComponent(Element elem)
コンポーネント要素の書き出しを行います。 |
protected void |
writeContent(Element elem,
boolean needsIndenting)
HTML に準拠した方法で属性セットを書き出します。 |
protected void |
writeEndParagraph()
<p> タグに対する終了タグを発行します。 |
protected void |
writeEndTag(String endTag)
適切にインデント処理された終了タグを書き出します。 |
protected void |
writeHeader()
<head> および <style> のタグを書き出し、次に writeStyles() を起動して <style> タグのコンテンツとしてすべての名前付きのスタイルを書き出します。 |
protected void |
writeHTMLTags(AttributeSet attr)
属性設定に基づいてテキストのボールド <b>、イタリック <i>、および <u> のタグを生成します。 |
protected void |
writeImage(Element elem)
アイコン要素の書き出しを行います。 |
protected void |
writeLeaf(Element elem)
テキスト以外の葉の要素の書き出しを制御します。 |
protected void |
writeNonHTMLAttributes(AttributeSet attr)
HTML 準拠の方法で残りの文字レベルの属性 (ボールド、イタリック、下線以外の属性) を書き出します。 |
protected void |
writeStartParagraph(Element elem)
段落の開始タグを発行します。 |
protected void |
writeStartTag(String tag)
適切にインデント処理された開始タグを書き出します。 |
protected void |
writeStyles()
<style> タグのコンテンツとしてすべての名前付きスタイルを書き出します。 |
| クラス javax.swing.text.AbstractWriter から継承されたメソッド |
|---|
decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, indent, inRange, isLineEmpty, output, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write, write, writeLineSeparator |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public MinimalHTMLWriter(Writer w,
StyledDocument doc)
w - ライターdoc - StyledDocument
public MinimalHTMLWriter(Writer w,
StyledDocument doc,
int pos,
int len)
w - ライターdoc - StyledDocumentpos - コンテンツを取得するドキュメント内の位置len - 書き出す量| メソッドの詳細 |
|---|
public void write()
throws IOException,
BadLocationException
AbstractWriter 内の writeIOException - 入出力エラーが発生した場合
BadLocationException - pos がドキュメント内の無効な位置を示す場合
protected void writeAttributes(AttributeSet attr)
throws IOException
AbstractWriter 内の writeAttributesattr - AttributeSet
IOException - 入出力エラーが発生した場合
protected void text(Element elem)
throws IOException,
BadLocationException
AbstractWriter 内の textelem - Element
IOException - 入出力エラーが発生した場合
BadLocationException - pos がドキュメント内の無効な位置を示す場合
protected void writeStartTag(String tag)
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeEndTag(String endTag)
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeHeader()
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeStyles()
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeBody()
throws IOException,
BadLocationException
IOException - 入出力エラーが発生した場合
BadLocationException
protected void writeEndParagraph()
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeStartParagraph(Element elem)
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeLeaf(Element elem)
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeImage(Element elem)
throws IOException
elem - StyleConstants.IconElementName 型の要素
IOException
protected void writeComponent(Element elem)
throws IOException
IOExceptionprotected boolean isText(Element elem)
protected void writeContent(Element elem,
boolean needsIndenting)
throws IOException,
BadLocationException
IOException - 入出力エラーが発生した場合
BadLocationException - pos がドキュメント内の無効な位置を示す場合
protected void writeHTMLTags(AttributeSet attr)
throws IOException
IOException - 入出力エラーが発生した場合
protected void writeNonHTMLAttributes(AttributeSet attr)
throws IOException
IOException - 入出力エラーが発生した場合protected boolean inFontTag()
protected void endFontTag()
throws IOException
<font> タグ用の終了タグを書き出します。
IOException - 入出力エラーが発生した場合
protected void startFontTag(String style)
throws IOException
<font> タグ用の開始タグを書き出します。フォントタグは入れ子にできないため、新しい開始タグを書き出す前に、フォントタグの囲みをクローズします。
IOException - 入出力エラーが発生した場合
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。