Package weka.gui

Class ReaderToTextPane

  • All Implemented Interfaces:
    Runnable

    public class ReaderToTextPane
    extends Thread
    A class that sends all lines from a reader to a JTextPane component.
    Version:
    $Revision$
    Author:
    Len Trigg (trigg@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • ReaderToTextPane

        public ReaderToTextPane​(Reader input,
                                JTextPane output)
        Sets up the thread. Using black as color for displaying the text.
        Parameters:
        input - the Reader to monitor
        output - the TextArea to send output to
      • ReaderToTextPane

        public ReaderToTextPane​(Reader input,
                                JTextPane output,
                                Color color)
        Sets up the thread.
        Parameters:
        input - the Reader to monitor
        output - the TextArea to send output to
        color - the color to use
    • Method Detail

      • getColor

        public Color getColor()
        Returns the color in use.
        Returns:
        the color
      • run

        public void run()
        Sit here listening for lines of input and appending them straight to the text component.
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread