Class Algorithm
java.lang.Object
|
+----java.lang.Thread
|
+----Algorithm
- public class Algorithm
- extends Thread
Superclass for implementing "What's In A Line?" algorithms.
-
_parameterPanel
- A reference to a peer parameter panel.
-
_parent
- A reference to the parent of this algorithm.
-
JOG
-
-
LOOP
-
-
RESET
-
-
RUN
-
-
STEP
-
-
STOP
-
-
Algorithm(AwtFrame, ThreadGroup, String)
- Algorithm superclass constructor.
-
algorithmName()
- Returns the name of the algorithm in plane text - this method must be overriden by a subclass.
-
clearBreakpoint()
- Clear the algorithm breakpoint.
-
getText()
- Returns the text of the algorithm - this method must be overriden by a subclass.
-
h(int)
- The callback function for each line of algorithm code.
-
jogPressed()
- Method to start algorithm execution in jog mode.
-
loopPressed()
- Method to start algorithm execution in loop mode.
-
resetParameters()
- Resets the algorithm parameters and notifies the parent of the change - this method
must be overriden by a subclass.
-
resetPressed()
- Method to reset the algorithm and all its parameters.
-
run()
- Overridden Thread function that starts the thread, not to be confused with running
the algorithm itself.
-
runPressed()
- Method to start algorithm execution.
-
setBreakpoint(int)
- Set the algorithm breakpoint at the line number specified by the parameter.
-
stepPressed()
- Method for executing a single algorithm instruction.
-
stopPressed()
- Method to stop algorithm execution.
-
theAlgorithm()
- A call to execute the algorithm - this method must be overriden by a subclass.
-
update()
- Updates the parent component with the available algorithm parameters - this method
must be overriden by a subclass.
-
WritePixel(int, int)
- Writes a black pixel at the specified location.
-
WritePixel(int, int, boolean)
- Writes a black pixel at the specified location.
-
WritePixel(int, int, float)
- Writes a pixel of the normalized intensity with respect to the background color.
-
WritePixel(int, int, float, boolean)
- Writes a pixel of the normalized intensity with respect to the background color.
STOP
public static final int STOP
RUN
public static final int RUN
JOG
public static final int JOG
LOOP
public static final int LOOP
STEP
public static final int STEP
RESET
public static final int RESET
_parameterPanel
public Panel _parameterPanel
- A reference to a peer parameter panel.
_parent
protected AwtFrame _parent
- A reference to the parent of this algorithm.
Algorithm
public Algorithm(AwtFrame f,
ThreadGroup t,
String n)
- Algorithm superclass constructor.
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
h
public void h(int lineNumber)
- The callback function for each line of algorithm code.
stopPressed
public void stopPressed()
- Method to stop algorithm execution.
runPressed
public void runPressed()
- Method to start algorithm execution.
jogPressed
public void jogPressed()
- Method to start algorithm execution in jog mode.
loopPressed
public void loopPressed()
- Method to start algorithm execution in loop mode.
stepPressed
public void stepPressed()
- Method for executing a single algorithm instruction.
resetPressed
public void resetPressed()
- Method to reset the algorithm and all its parameters.
WritePixel
public void WritePixel(int x,
int y)
- Writes a black pixel at the specified location.
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.
WritePixel
public void WritePixel(int x,
int y,
float value)
- Writes a pixel of the normalized intensity with respect to the background color.
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.
update
public void update()
- Updates the parent component with the available algorithm parameters - this method
must be overriden by a subclass.
resetParameters
public void resetParameters()
- Resets the algorithm parameters and notifies the parent of the change - this method
must be overriden by a subclass.
theAlgorithm
public void theAlgorithm()
- A call to execute the algorithm - this method must be overriden by a subclass.
getText
public String getText()
- Returns the text of the algorithm - this method must be overriden by a subclass.
algorithmName
public String algorithmName()
- Returns the name of the algorithm in plane text - this method must be overriden by a subclass.
setBreakpoint
public void setBreakpoint(int breakpoint)
- Set the algorithm breakpoint at the line number specified by the parameter.
clearBreakpoint
public void clearBreakpoint()
- Clear the algorithm breakpoint.