クラス org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter

すべてのメンバ一覧

説明

A implementation of the java.io.Writer class which provides writing to a JTextArea via a stream.

作者:
Nicolas Modrzyk

Anthony Eden

JTextAreaWriter.java40 行で定義されています。

Public メソッド

 JTextAreaWriter (JTextArea textArea)
void setTextArea (JTextArea textArea)
void close ()
void flush () throws IOException
void write (char[] charArray) throws IOException
void write (char[] charArray, int offset, int length) throws IOException
void write (int c) throws IOException
void write (String string) throws IOException
void write (String string, int offset, int length) throws IOException

Private メソッド

StringBuffer getBuffer ()

Private 変数

boolean closed = false
JTextArea textArea
StringBuffer buffer


コンストラクタとデストラクタ

org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.JTextAreaWriter JTextArea  textArea  ) 
 

Constructor.

引数:
textArea The JTextArea to write to.
JTextAreaWriter.java53 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.setTextArea().

00054 { 00055 setTextArea(textArea); 00056 }


メソッド

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.close  ) 
 

Close the stream. JTextAreaWriter.java75 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed.

00076 { 00077 closed = true; 00078 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.flush  )  throws IOException
 

Flush the data that is currently in the buffer.

例外:
IOException if fails
JTextAreaWriter.java86 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.buffer, org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed, org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer(), と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.textArea.

00087 { 00088 if (closed) 00089 { 00090 throw new IOException("The stream is closed."); 00091 } 00092 textArea.append(getBuffer().toString()); 00093 textArea.setCaretPosition(textArea.getDocument().getLength()); 00094 buffer = null; 00095 }

StringBuffer org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer  )  [private]
 

Get the StringBuffer which holds the data prior to writing via a call to the flush() method. This method should never return null.

戻り値:
A StringBuffer
JTextAreaWriter.java187 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.buffer.

参照元 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.flush(), と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write().

00188 { 00189 if (buffer == null) 00190 { 00191 buffer = new StringBuffer(); 00192 } 00193 return buffer; 00194 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.setTextArea JTextArea  textArea  ) 
 

Set the JTextArea to write to.

引数:
textArea The JTextArea
JTextAreaWriter.java64 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.JTextAreaWriter().

00065 { 00066 if (textArea == null) 00067 { 00068 throw new IllegalArgumentException("The text area must not be null."); 00069 } 00070 this.textArea = textArea; 00071 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write String  string,
int  offset,
int  length
throws IOException
 

Write the given String to the output stream beginning from the given offset and proceeding to until the given length is reached.

引数:
string The String
offset The start offset
length The length to write
例外:
IOException if fails
JTextAreaWriter.java171 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed, と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer().

00172 { 00173 if (closed) 00174 { 00175 throw new IOException("The stream is not open."); 00176 } 00177 getBuffer().append(string.substring(offset, length)); 00178 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write String  string  )  throws IOException
 

Write the given String to the output stream.

引数:
string The String
例外:
IOException if fails
JTextAreaWriter.java152 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed, と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer().

00153 { 00154 if (closed) 00155 { 00156 throw new IOException("The stream is not open."); 00157 } 00158 getBuffer().append(string); 00159 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write int  c  )  throws IOException
 

Write the given character to the output stream.

引数:
c The character
例外:
IOException if fails
JTextAreaWriter.java136 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed, と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer().

00137 { 00138 if (closed) 00139 { 00140 throw new IOException("The stream is not open."); 00141 } 00142 getBuffer().append((char) c); 00143 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write char[]  charArray,
int  offset,
int  length
throws IOException
 

Write the given character array to the output stream beginning from the given offset and proceeding to until the given length is reached.

引数:
charArray The character array
offset The start offset
length The length to write
例外:
IOException if fails
JTextAreaWriter.java119 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed, と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer().

00121 { 00122 if (closed) 00123 { 00124 throw new IOException("The stream is not open."); 00125 } 00126 getBuffer().append(charArray, offset, length); 00127 }

void org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write char[]  charArray  )  throws IOException
 

Write the given character array to the output stream.

引数:
charArray The character array
例外:
IOException if fails
JTextAreaWriter.java104 行で定義されています。
00105 { 00106 write(charArray, 0, charArray.length); 00107 }


変数

StringBuffer org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.buffer [private]
 

JTextAreaWriter.java45 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.flush(), と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.getBuffer().

boolean org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.closed = false [private]
 

JTextAreaWriter.java43 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.close(), org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.flush(), と org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.write().

JTextArea org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.textArea [private]
 

JTextAreaWriter.java44 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.jtools.JTextAreaWriter.flush().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:21 2004に生成されました。 doxygen 1.3.8