ghm.follow
Class JTextPaneDestination

java.lang.Object
  extended byghm.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

Field Summary
protected  boolean autoPositionCaret_
           
protected  javax.swing.JTextPane jTextPane_
           
 
Constructor Summary
JTextPaneDestination(javax.swing.JTextPane jTextPane, boolean autoPositionCaret)
          Construct a new JTextPaneDestination.
 
Method Summary
 boolean autoPositionCaret()
           
 void clear()
          Clear all previous text.
 javax.swing.JTextPane getJTextPane()
           
 void print(java.lang.String s)
          Print the supplied String.
 void setAutoPositionCaret(boolean autoPositionCaret)
           
 void setJTextArea(javax.swing.JTextPane jTextPane)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jTextPane_

protected javax.swing.JTextPane jTextPane_

autoPositionCaret_

protected boolean autoPositionCaret_
Constructor Detail

JTextPaneDestination

public JTextPaneDestination(javax.swing.JTextPane jTextPane,
                            boolean autoPositionCaret)
Construct a new JTextPaneDestination.

Parameters:
jTextPane - text will be appended to this text area
autoPositionCaret - if true, caret will be automatically moved to the bottom of the text area when text is appended
Method Detail

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