Class UserInterface.FileLoader

java.lang.Object
  |
  +--UserInterface.FileLoader
Enclosing class:
UserInterface

class UserInterface.FileLoader
extends java.lang.Object
implements java.lang.Runnable

this inner class starts a thread for loading a document


Field Summary
(package private)  Document d
           
(package private)  UserInterface.Progress progres
          holds a referrence to the object that shows the progress of the loading
(package private)  java.lang.Thread t
           
 
Constructor Summary
(package private) UserInterface.FileLoader(Document d, javax.swing.JFrame mainframe)
           
 
Method Summary
private  void Load(Document d)
          loads the document
 void ReadFile(Document d)
          reads the file from the disk the method is synchronized on the vector docs for avoiding the possibility of reading the same file in the same time
 void run()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

progres

UserInterface.Progress progres
holds a referrence to the object that shows the progress of the loading

t

java.lang.Thread t

d

Document d
Constructor Detail

UserInterface.FileLoader

UserInterface.FileLoader(Document d,
                         javax.swing.JFrame mainframe)
Parameters:
d - the document to be loaded
mainframe - the parent of the progress object
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

Load

private void Load(Document d)
loads the document
Parameters:
d - the document to be loaded

ReadFile

public void ReadFile(Document d)
              throws java.io.FileNotFoundException
reads the file from the disk the method is synchronized on the vector docs for avoiding the possibility of reading the same file in the same time
See Also:
Document.isTag(String), UserInterface.DisplayCurrentTurn(), Judgements