public class DefaultHTMLReaderTarget extends java.lang.Object implements HTMLReaderTarget
DefaultHTMLReaderTarget class is a default implementation
of the interface for the target into which the html reader renders the
HTML document.HTMLReader,
HTMLReaderTarget| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.awt.Color |
backgroundColor
The background color.
|
protected TextBuffer |
buffer
The text buffer.
|
protected HTMLStyle |
htmlStyle
The html style.
|
protected java.awt.Color |
linkColor
The link color.
|
protected java.awt.Color |
textColor
The text color.
|
protected java.lang.String |
title
The document title.
|
protected java.net.URL |
url
The document url.
|
| コンストラクタと説明 |
|---|
DefaultHTMLReaderTarget()
Constructs a default html reader target.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
append(Text text)
Appends the specified text into the target.
|
void |
close()
Closes (Finalizes) this target.
|
TextAttachment |
getAttachmentAt(int index)
Returns the text attachment at the specified index in the data written.
|
char |
getChar(int index)
Returns the character at the specified index in the data written.
|
HTMLText |
getHTMLText()
Returns the html text representation of the data written.
|
int |
getLength()
Returns the length of the data written.
|
RichText |
getRichText()
Returns the rich text representation of the data written.
|
java.lang.String |
getString()
Returns the string representation of the data written.
|
void |
open(java.net.URL url,
HTMLStyle htmlStyle)
Opens (Initializes) this target with the specified url and html style.
|
void |
setBackgroundColor(java.awt.Color color)
Sets the background color (the
BGCOLOR attribute in the
BODY tag) to be the specified color. |
void |
setLinkColor(java.awt.Color color)
Sets the text color (the
LINK attribute in the
BODY tag) to be the specified color. |
void |
setParagraphStyle(ParagraphStyle paragraphStyle)
Sets the current paragraph style of the target to be the specified
paragraph style.
|
void |
setTextColor(java.awt.Color color)
Sets the text color (the
TEXT attribute in the
BODY tag) to be the specified color. |
void |
setTitle(java.lang.String string)
Sets the document title (the
TITLE tag) to be the specified
string. |
protected TextBuffer buffer
protected HTMLStyle htmlStyle
protected java.net.URL url
protected java.lang.String title
protected java.awt.Color backgroundColor
protected java.awt.Color textColor
protected java.awt.Color linkColor
public DefaultHTMLReaderTarget()
public void open(java.net.URL url,
HTMLStyle htmlStyle)
throws java.io.IOException
open インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void close()
throws java.io.IOException
close インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public int getLength()
getLength インタフェース内 HTMLReaderTargetpublic char getChar(int index)
getChar インタフェース内 HTMLReaderTargetpublic TextAttachment getAttachmentAt(int index)
getAttachmentAt インタフェース内 HTMLReaderTargetpublic void append(Text text) throws java.io.IOException
append インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void setParagraphStyle(ParagraphStyle paragraphStyle) throws java.io.IOException
setParagraphStyle インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void setTitle(java.lang.String string)
throws java.io.IOException
TITLE tag) to be the specified
string.setTitle インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void setBackgroundColor(java.awt.Color color)
throws java.io.IOException
BGCOLOR attribute in the
BODY tag) to be the specified color.setBackgroundColor インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void setTextColor(java.awt.Color color)
throws java.io.IOException
TEXT attribute in the
BODY tag) to be the specified color.setTextColor インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public void setLinkColor(java.awt.Color color)
throws java.io.IOException
LINK attribute in the
BODY tag) to be the specified color.setLinkColor インタフェース内 HTMLReaderTargetjava.io.IOException - If an I/O error occurs.public java.lang.String getString()
getString インタフェース内 HTMLReaderTargetpublic RichText getRichText()
getRichText インタフェース内 HTMLReaderTargetpublic HTMLText getHTMLText()
getHTMLText インタフェース内 HTMLReaderTarget