ghm.follow.io
Class JTextPaneDestination

java.lang.Object
  extended by ghm.follow.io.JTextPaneDestination
All Implemented Interfaces:
OutputDestination

public class JTextPaneDestination
extends java.lang.Object
implements OutputDestination

Implementation of OutputDestination which appends Strings to a JTextPane.

Author:
Carl Hall
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
 void addFilteredView()
          Add a filtered view to this destination.
 boolean autoPositionCaret()
           
 void clear()
          Clear all previous text.
 javax.swing.JTextPane getJTextPane()
           
 void print(java.lang.String s)
          Print the supplied String.
 void removeFilteredView()
          Remove a filtered view
 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)

addFilteredView

public void addFilteredView()
Add a filtered view to this destination. Filtered views show only a subset of the total output based on filter conditions.

Since:
1.8.0

removeFilteredView

public void removeFilteredView()
Remove a filtered view

Since:
1.8.0

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


Copyright © 2008. All Rights Reserved.