|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
com.isti.util.gui.TextAreaWriter
public class TextAreaWriter
Class TextAreaWriter is an extension of 'Writer' that sends its output to a 'JTextArea' object.
| Field Summary | |
|---|---|
static int |
DEF_MAXNL_SEARCH
Max # of chars to search for newline after trim (400). |
static int |
DEF_TEXTSIZE_LIMIT
Default text size limit, in characters (8000000). |
static int |
DEF_TEXTTRIM_SIZE
Number of characters to trim when over limit (8000). |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
TextAreaWriter(javax.swing.JTextArea textAreaObj)
Creates an 'Writer' extension that sends its output to a 'TextArea' object. |
|
TextAreaWriter(javax.swing.JTextArea textAreaObj,
boolean setupTextObjFlag)
Creates an 'Writer' extension that sends its output to a 'TextArea' object. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream; does nothing in this implementation. |
void |
doSetupTextAreaObj()
Sets up the text area object to be not-editable while still having a visible caret and text cursor. |
void |
doWrite(char[] charsArr,
int offsetVal,
int numChars)
Sends a portion of an array of characters to the text area. |
void |
flush()
Flushes the stream; does nothing in this implementation. |
int |
getMaxNewLineSearch()
Returns the text size limit. |
int |
getTextSizeLimit()
Returns the maximum number of characters to search for a newline after a trim. |
int |
getTextTrimSize()
Returns the text trim size. |
void |
setTextSizeLimitValues(int textSizeLimit,
int textTrimSize)
Sets the text size limit values. |
void |
setTextSizeLimitValues(int textSizeLimit,
int textTrimSize,
int maxNewLineSearch)
Sets the text size limit values. |
void |
setupTextAreaObj()
Sets up the text area object to be not-editable while still having a visible caret and text cursor. |
void |
write(char[] charsArr,
int offsetVal,
int numChars)
Sends a portion of an array of characters to the text area. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEF_TEXTSIZE_LIMIT
public static final int DEF_TEXTTRIM_SIZE
public static final int DEF_MAXNL_SEARCH
| Constructor Detail |
|---|
public TextAreaWriter(javax.swing.JTextArea textAreaObj)
textAreaObj - 'TextArea' object
public TextAreaWriter(javax.swing.JTextArea textAreaObj,
boolean setupTextObjFlag)
textAreaObj - 'TextArea' objectsetupTextObjFlag - if true then 'setupTextAreaObj()' is
called to setup the given text area object.| Method Detail |
|---|
public void setupTextAreaObj()
public void doSetupTextAreaObj()
public void write(char[] charsArr,
int offsetVal,
int numChars)
throws java.io.IOException
write in class java.io.WritercharsArr - array of characters.offsetVal - offset from which to start writing characters.numChars - number of characters to write.
java.io.IOException - if an I/O error occurs.
public void doWrite(char[] charsArr,
int offsetVal,
int numChars)
throws java.io.IOException
charsArr - array of characters.offsetVal - offset from which to start writing characters.numChars - number of characters to write.
java.io.IOException - if an I/O error occurs.public void flush()
flush in interface java.io.Flushableflush in class java.io.Writerpublic void close()
close in interface java.io.Closeableclose in class java.io.Writer
public void setTextSizeLimitValues(int textSizeLimit,
int textTrimSize,
int maxNewLineSearch)
textSizeLimit - text size limit, in characters.textTrimSize - number of character to trim when over limit.maxNewLineSearch - maximum number of characters to search for
a newline after a trim, or 0 or no search.
public void setTextSizeLimitValues(int textSizeLimit,
int textTrimSize)
textSizeLimit - text size limit, in characters.textTrimSize - number of character to trim when over limit.public int getTextTrimSize()
public int getMaxNewLineSearch()
public int getTextSizeLimit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||