userinterface
Class MessageUpdater

java.lang.Object
  extended by userinterface.MessageUpdater
All Implemented Interfaces:
java.lang.Runnable

 class MessageUpdater
extends java.lang.Object
implements java.lang.Runnable

This internal class is meant to run as an independent thread to update messages to the user. While the program is running, this thread will often check for new messages to post.

Author:
Håvard Rykkelid

Field Summary
(package private)  javax.swing.JButton button
           
(package private)  java.util.Vector<DataPackage> messages
           
(package private)  javax.swing.JTextField textField
           
 
Constructor Summary
MessageUpdater(javax.swing.JTextField textField, javax.swing.JButton button)
          The constructor
 
Method Summary
 void run()
          This method will be run when the Thread containing this class-description is started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textField

javax.swing.JTextField textField

button

javax.swing.JButton button

messages

java.util.Vector<DataPackage> messages
Constructor Detail

MessageUpdater

MessageUpdater(javax.swing.JTextField textField,
               javax.swing.JButton button)
The constructor

Parameters:
textField - - a reference to the text-field where messages should be posted
button - - a reference to the button that should change text between "start" and "stop"
Method Detail

run

public void run()
This method will be run when the Thread containing this class-description is started

Specified by:
run in interface java.lang.Runnable