Class TextHistoryPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TextHistoryPane extends JPanel
TextHistoryPane Keeps a user-settable number of lines in a JTextArea. Lines are always appended to bottom, and top lines are scrolled off. A popup menu allows the user to change the number of lines to keep.
Version:
$Id: TextHistoryPane.java,v 1.11 2007/07/06 20:45:33 jeffmc Exp $
Author:
John Caron
See Also:
  • Constructor Details

    • TextHistoryPane

      public TextHistoryPane(int nlines, int removeIncr, boolean popupOK)
      constructor
      Parameters:
      nlines - number of lines of text to keep history of
      removeIncr - remove this number of lines at a time
      popupOK - enable popup menu
  • Method Details

    • appendLine

      public void appendLine(String line)
      Append this line to the bottom of the JTextArea. A newline is added and JTextArea is scrolled to bottom; remove lines at top if needed.
      Parameters:
      line - append this line. Ok to have multiple lines (ie embedded newlines) but not too many.
    • clear

      public void clear()
      _more_
    • gotoTop

      public void gotoTop()
      _more_