ghm.follow
Class JTextAreaDestination
java.lang.Object
ghm.follow.JTextAreaDestination
- All Implemented Interfaces:
- OutputDestination
- public class JTextAreaDestination
- extends java.lang.Object
- implements OutputDestination
Implementation of OutputDestination which appends Strings to a
JTextArea.
- Author:
- Greg Merrill
- See Also:
OutputDestination,
JTextArea
|
Constructor Summary |
JTextAreaDestination(javax.swing.JTextArea jTextArea,
boolean autoPositionCaret)
Construct a new JTextAreaDestination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jTextArea_
protected javax.swing.JTextArea jTextArea_
autoPositionCaret_
protected boolean autoPositionCaret_
JTextAreaDestination
public JTextAreaDestination(javax.swing.JTextArea jTextArea,
boolean autoPositionCaret)
- Construct a new JTextAreaDestination.
- Parameters:
jTextArea - text will be appended to this text areaautoPositionCaret - if true, caret will be automatically moved
to the bottom of the text area when text is appended
getJTextArea
public javax.swing.JTextArea getJTextArea()
setJTextArea
public void setJTextArea(javax.swing.JTextArea jTextArea)
autoPositionCaret
public boolean autoPositionCaret()
- Returns:
- whether caret will be automatically moved to the bottom of the text area when
text is appended
setAutoPositionCaret
public void setAutoPositionCaret(boolean autoPositionCaret)
- Parameters:
autoPositionCaret - if true, caret will be automatically moved to the bottom of
the text area when text is appended
print
public void print(java.lang.String s)
- Description copied from interface:
OutputDestination
- Print the supplied String.
- Specified by:
print in interface OutputDestination
- Parameters:
s - String to be printed
clear
public void clear()
- Description copied from interface:
OutputDestination
- Clear all previous text.
- Specified by:
clear in interface OutputDestination