Class Algorithm

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----Algorithm

public class Algorithm
extends Thread
Superclass for implementing "What's In A Line?" algorithms.


Variable Index

 o _parameterPanel
A reference to a peer parameter panel.
 o _parent
A reference to the parent of this algorithm.
 o JOG
 o LOOP
 o RESET
 o RUN
 o STEP
 o STOP

Constructor Index

 o Algorithm(AwtFrame, ThreadGroup, String)
Algorithm superclass constructor.

Method Index

 o algorithmName()
Returns the name of the algorithm in plane text - this method must be overriden by a subclass.
 o clearBreakpoint()
Clear the algorithm breakpoint.
 o getText()
Returns the text of the algorithm - this method must be overriden by a subclass.
 o h(int)
The callback function for each line of algorithm code.
 o jogPressed()
Method to start algorithm execution in jog mode.
 o loopPressed()
Method to start algorithm execution in loop mode.
 o resetParameters()
Resets the algorithm parameters and notifies the parent of the change - this method must be overriden by a subclass.
 o resetPressed()
Method to reset the algorithm and all its parameters.
 o run()
Overridden Thread function that starts the thread, not to be confused with running the algorithm itself.
 o runPressed()
Method to start algorithm execution.
 o setBreakpoint(int)
Set the algorithm breakpoint at the line number specified by the parameter.
 o stepPressed()
Method for executing a single algorithm instruction.
 o stopPressed()
Method to stop algorithm execution.
 o theAlgorithm()
A call to execute the algorithm - this method must be overriden by a subclass.
 o update()
Updates the parent component with the available algorithm parameters - this method must be overriden by a subclass.
 o WritePixel(int, int)
Writes a black pixel at the specified location.
 o WritePixel(int, int, boolean)
Writes a black pixel at the specified location.
 o WritePixel(int, int, float)
Writes a pixel of the normalized intensity with respect to the background color.
 o WritePixel(int, int, float, boolean)
Writes a pixel of the normalized intensity with respect to the background color.

Variables

 o STOP
 public static final int STOP
 o RUN
 public static final int RUN
 o JOG
 public static final int JOG
 o LOOP
 public static final int LOOP
 o STEP
 public static final int STEP
 o RESET
 public static final int RESET
 o _parameterPanel
 public Panel _parameterPanel
A reference to a peer parameter panel.

 o _parent
 protected AwtFrame _parent
A reference to the parent of this algorithm.

Constructors

 o Algorithm
 public Algorithm(AwtFrame f,
                  ThreadGroup t,
                  String n)
Algorithm superclass constructor.

Methods

 o run
 public void run()
Overridden Thread function that starts the thread, not to be confused with running the algorithm itself.

Overrides:
run in class Thread
 o h
 public void h(int lineNumber)
The callback function for each line of algorithm code.

 o stopPressed
 public void stopPressed()
Method to stop algorithm execution.

 o runPressed
 public void runPressed()
Method to start algorithm execution.

 o jogPressed
 public void jogPressed()
Method to start algorithm execution in jog mode.

 o loopPressed
 public void loopPressed()
Method to start algorithm execution in loop mode.

 o stepPressed
 public void stepPressed()
Method for executing a single algorithm instruction.

 o resetPressed
 public void resetPressed()
Method to reset the algorithm and all its parameters.

 o WritePixel
 public void WritePixel(int x,
                        int y)
Writes a black pixel at the specified location.

 o WritePixel
 public void WritePixel(int x,
                        int y,
                        boolean c)
Writes a black pixel at the specified location. The boolean value can be used to turn off re-centering of the ZoomPanel.

 o WritePixel
 public void WritePixel(int x,
                        int y,
                        float value)
Writes a pixel of the normalized intensity with respect to the background color.

 o WritePixel
 public void WritePixel(int x,
                        int y,
                        float value,
                        boolean c)
Writes a pixel of the normalized intensity with respect to the background color.

 o update
 public void update()
Updates the parent component with the available algorithm parameters - this method must be overriden by a subclass.

 o resetParameters
 public void resetParameters()
Resets the algorithm parameters and notifies the parent of the change - this method must be overriden by a subclass.

 o theAlgorithm
 public void theAlgorithm()
A call to execute the algorithm - this method must be overriden by a subclass.

 o getText
 public String getText()
Returns the text of the algorithm - this method must be overriden by a subclass.

 o algorithmName
 public String algorithmName()
Returns the name of the algorithm in plane text - this method must be overriden by a subclass.

 o setBreakpoint
 public void setBreakpoint(int breakpoint)
Set the algorithm breakpoint at the line number specified by the parameter.

 o clearBreakpoint
 public void clearBreakpoint()
Clear the algorithm breakpoint.