|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream com.isti.util.gui.TextAreaOutputStream
public class TextAreaOutputStream
Class TextAreaOutputStream is an extension of 'OutputStream' 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). |
Constructor Summary | |
---|---|
TextAreaOutputStream(javax.swing.JTextArea textAreaObj)
Creates an 'OutputStream' extension that sends its output to a 'TextArea' object. |
|
TextAreaOutputStream(javax.swing.JTextArea textAreaObj,
boolean setupTextObjFlag)
Creates an 'OutputStream' extension that sends its output to a 'TextArea' object. |
Method Summary | |
---|---|
void |
doSetupTextAreaObj()
Sets up the text area object to be not-editable while still having a visible caret and text cursor. |
void |
doWrite(byte[] byteArr,
int offsetVal,
int numChars)
Sends a portion of an array of bytes to the text area. |
void |
doWrite(int val)
Sends the specified character value to the text area. |
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(byte[] byteArr,
int offsetVal,
int numChars)
Sends a portion of an array of bytes to the text area. |
void |
write(int val)
Sends the specified character value to the text area. |
Methods inherited from class java.io.OutputStream |
---|
close, flush, 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 TextAreaOutputStream(javax.swing.JTextArea textAreaObj)
textAreaObj
- 'TextArea' objectpublic TextAreaOutputStream(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(int val) throws java.io.IOException
write
in class java.io.OutputStream
val
- the character value.
java.io.IOException
- if an I/O error occurs (in particular,
an IOException may be thrown if the output stream has been closed).public void write(byte[] byteArr, int offsetVal, int numChars) throws java.io.IOException
write
in class java.io.OutputStream
byteArr
- 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(int val) throws java.io.IOException
val
- the character value.
java.io.IOException
- if an I/O error occurs (in particular,
an IOException may be thrown if the output stream has been closed).public void doWrite(byte[] byteArr, int offsetVal, int numChars) throws java.io.IOException
byteArr
- 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 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 |