rjw.dc.messages
Class MessagesWriter

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--rjw.dc.messages.MessagesWriter
All Implemented Interfaces:
java.lang.Runnable

public final class MessagesWriter
extends java.lang.Thread

Provides input for the logfile and the LogForm. The messages are read from the Messages class which is basically a queue of messages.

Since:
1.3
Version:
DC0.50
Author:
Robert-Jan van der Waals

Field Summary
static boolean _useLogFile
          Specifies if the messages should be written to the logfile
static boolean _windowShow
          Specifies if the log window should be shown
static boolean _windowToFront
          Specifies if the log window should be at the front
static LogForm logForm
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MessagesWriter()
          Initializes the Message writer
 
Method Summary
 void run()
          Keeps on checking the Messages class for newly arrived messages.
 void write(java.lang.String message)
          Writes a message to the end of the log file and to the logform
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logForm

public static LogForm logForm

_windowToFront

public static boolean _windowToFront
Specifies if the log window should be at the front


_windowShow

public static boolean _windowShow
Specifies if the log window should be shown


_useLogFile

public static boolean _useLogFile
Specifies if the messages should be written to the logfile

Constructor Detail

MessagesWriter

public MessagesWriter()
Initializes the Message writer

Method Detail

run

public void run()
Keeps on checking the Messages class for newly arrived messages. The parameters _windowToFront and _windowShow determine the state of the LogForm

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

write

public void write(java.lang.String message)
Writes a message to the end of the log file and to the logform

Parameters:
message - message String