Package weka.gui

Class ReaderToTextPane

  • All Implemented Interfaces:
    java.lang.Runnable

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

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      ReaderToTextPane​(java.io.Reader input, javax.swing.JTextPane output)
      Sets up the thread.
      ReaderToTextPane​(java.io.Reader input, javax.swing.JTextPane output, java.awt.Color color)
      Sets up the thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getColor()
      Returns the color in use.
      void run()
      Sit here listening for lines of input and appending them straight to the text component.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReaderToTextPane

        public ReaderToTextPane​(java.io.Reader input,
                                javax.swing.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​(java.io.Reader input,
                                javax.swing.JTextPane output,
                                java.awt.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 java.awt.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 java.lang.Runnable
        Overrides:
        run in class java.lang.Thread