|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
madkit.utils.graphics.GUIReader
public class GUIReader
A character stream whose source is a TextField or JTextField.
Field Summary |
---|
Fields inherited from class java.io.Reader |
---|
lock |
Constructor Summary | |
---|---|
GUIReader(javax.swing.JTextField s)
Create a new string reader. |
|
GUIReader(javax.swing.JTextField s,
java.io.Writer w)
Create a new string reader. |
|
GUIReader(java.awt.TextField s)
Create a new string reader. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
close()
Close the stream. |
boolean |
getDuplicateOnOutput()
Get the value of duplicateOnOutput. |
boolean |
markSupported()
Tell whether this stream supports the mark() operation, which it does. |
int |
read()
Read a single character. |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
boolean |
ready()
Tell whether this stream is ready to be read. |
void |
reset()
Reset the stream to the most recent mark, or to the beginning of the string if it has never been marked. |
void |
setDuplicateOnOutput(boolean v)
Set the value of duplicateOnOutput. |
long |
skip(long ns)
Skip characters. |
Methods inherited from class java.io.Reader |
---|
mark, read, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GUIReader(java.awt.TextField s)
public GUIReader(javax.swing.JTextField s)
public GUIReader(javax.swing.JTextField s, java.io.Writer w)
Method Detail |
---|
public boolean getDuplicateOnOutput()
public void setDuplicateOnOutput(boolean v)
v
- Value to assign to duplicateOnOutput.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public int read() throws java.io.IOException
read
in class java.io.Reader
java.io.IOException
- If an I/O error occurspublic int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.Reader
cbuf
- Destination bufferoff
- Offset at which to start writing characterslen
- Maximum number of characters to read
java.io.IOException
- If an I/O error occurspublic long skip(long ns) throws java.io.IOException
skip
in class java.io.Reader
java.io.IOException
- If an I/O error occurspublic boolean ready()
ready
in class java.io.Reader
public boolean markSupported()
markSupported
in class java.io.Reader
public void reset() throws java.io.IOException
reset
in class java.io.Reader
java.io.IOException
- If an I/O error occurspublic void close()
close
in interface java.io.Closeable
close
in class java.io.Reader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |