Class AlgThread
java.lang.Object
   |
   +----java.lang.Thread
           |
           +----AlgThread
  -  public class AlgThread
  -  extends Thread
AlgThread is an extension of the provided Java 
 multi-threading package.
 It enables the graphical display of the main execution thread to be
 updated during the execution of the algorithm.
 
 A section of this source file is normally displayed on the TextFrame.
 This section starts with the line after 
 /*------------------*/
  and finishes before the line //------------
 .
 Every line starting with /*-*/ will be discarded in
 the source code display area and each line is terminated by the first
 encounter of /*-*/.
 
 The source file AlgThread.java is to be
 modified/completed for separate animation algorithms.
   
  -   dataSets dataSets
-   Array of strings used to set the choices of the data choice button
 in data menu.
  
-   drawingPanel drawingPanel
-   A reference to the drawing panel in order to update the animation
 during the execution of the algorithm.
  
-   frame frame
-   The initial caller of the constructor of this class.
  
-   max_data max_data
-   Size of the data set appropriate for algorighm animation.
   
  -   AlgThread(AlgAnimFrame) AlgThread(AlgAnimFrame)
-   Creates a new thread using the frame passed in as the parameter.
   
  -   generateData() generateData()
-   Generate data based on the choice made on the menu.
  
-   restoreDrawingPanel() restoreDrawingPanel()
-   Restore the drawing panel at the beginning or the end of each
 simulation.
  
-   run() run()
-   This method is invoked when the Threadclassstart()method is called.
-   setDelay(int) setDelay(int)
-   Sets the delay between each animation step.
  
-   waitSkip() waitSkip()
-   This method is to be placed after the line where the fast
 forward function is to be performed.
   
 max_data
max_data
 public int max_data
  -  Size of the data set appropriate for algorighm animation.
 
 dataSets
dataSets
 public static String dataSets[]
  -  Array of strings used to set the choices of the data choice button
 in data menu.
 
 frame
frame
 public AlgAnimFrame frame
  -  The initial caller of the constructor of this class.
 It holds the references to all existing panels.
 
 drawingPanel
drawingPanel
 public DrawingPanel drawingPanel
  -  A reference to the drawing panel in order to update the animation
 during the execution of the algorithm.
   
-  
    -  See Also:
    
-  DrawingPanel
  
 
   
 AlgThread
AlgThread
 public AlgThread(AlgAnimFrame frame)
  -  Creates a new thread using the frame passed in as the parameter.
 If this constructor is called from the frame constructor,
 a drawingPanel will be initialized and assigned to the frame
 class.
   
- 
    -  Parameters:
    
-  frame - An extended frame where the algorithm is going to
 execute in.
    
-  See Also:
    
-  AlgAnimFrame
  
 
   
 setDelay
setDelay
 public void setDelay(int delay)
  -  Sets the delay between each animation step. This determines
 the rate the drawingPanel is updated. The setDelaymethod is normally called by the action listener of
 thedelay choice buttonon the control panel.
   
- 
    -  Parameters:
    
-  delay - The delay set in milliseconds.
  
 
 generateData
generateData
 public void generateData()
  -  Generate data based on the choice made on the menu.
 This method is application specific
 and the contents for the satisfaction of each 'if' statement
 have to be filled in based on the algorithm.
 
 run
run
 public void run()
  -  This method is invoked when the Threadclassstart()method is called.
 It contains the statements to execute the methods which perform
 the algorithm. This method is to be completed based on separate
 animation algorithms.
   
- 
    -  Overrides:
    
-  run in class Thread
    
-  See Also:
    
-  Thread
  
 
 restoreDrawingPanel
restoreDrawingPanel
 public void restoreDrawingPanel()
  -  Restore the drawing panel at the beginning or the end of each
 simulation.
 
 waitSkip
waitSkip
 public void waitSkip()
  -  This method is to be placed after the line where the fast
 forward function is to be performed.