ghm.follow
Class JTextPaneDestination
java.lang.Object
ghm.follow.JTextPaneDestination
- All Implemented Interfaces:
- OutputDestination
- public class JTextPaneDestination
- extends java.lang.Object
- implements OutputDestination
Implementation of OutputDestination which appends Strings to a
JTextPane.
- Author:
- Greg Merrill
- See Also:
OutputDestination,
JTextPane
|
Constructor Summary |
JTextPaneDestination(javax.swing.JTextPane jTextPane,
boolean autoPositionCaret)
Construct a new JTextPaneDestination. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jTextPane_
protected javax.swing.JTextPane jTextPane_
autoPositionCaret_
protected boolean autoPositionCaret_
JTextPaneDestination
public JTextPaneDestination(javax.swing.JTextPane jTextPane,
boolean autoPositionCaret)
- Construct a new JTextPaneDestination.
- Parameters:
jTextPane - 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
getJTextPane
public javax.swing.JTextPane getJTextPane()
setJTextArea
public void setJTextArea(javax.swing.JTextPane jTextPane)
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