public class IteratorTaskExecutor
extends org.sm.smtools.application.concurrent.TaskExecutor
IteratorTaskExecutor
class provides a facility for organising partial iteration tasks.
Note that this class cannot be subclassed!
Constructor and Description |
---|
IteratorTaskExecutor(javax.swing.JFrame parentFrame,
org.sm.smtools.application.util.JProgressUpdateGlassPane progressUpdateGlassPane,
AFractalIterator fractalIterator,
FractalPanel fractalPanel,
javax.swing.JLabel statusBarCalculationTimeLabel,
boolean estimatePDF,
org.sm.smtools.application.util.JARResources resources)
Constructs an
IteratorTaskExecutor object. |
Modifier and Type | Method and Description |
---|---|
protected void |
finishTasks()
Collects all the partial iteration results and creates the fractal result buffer, as well
as an estimation of the PDF of the number of iterations required.
|
IterationBuffer |
getFractalResultBuffer()
Returns the fractal result buffer.
|
org.sm.smtools.math.FunctionLookupTable |
getIterationsPDF()
Returns the PDF of the iterations.
|
protected void |
initialise()
Performs custom initialisation before tasks are executed.
|
void |
prepareTask(org.sm.smtools.application.concurrent.ATask task)
Allows preparation of a task before adding it to the internal task list.
|
void |
setFractalResultBuffer(IterationBuffer fractalResultBuffer)
Manually sets the fractal result buffer.
|
addTask, addTasks, doInBackground, done, getNrOfThreadsToUse, getTasks, isBusy, setNrOfThreadsToUse
public IteratorTaskExecutor(javax.swing.JFrame parentFrame, org.sm.smtools.application.util.JProgressUpdateGlassPane progressUpdateGlassPane, AFractalIterator fractalIterator, FractalPanel fractalPanel, javax.swing.JLabel statusBarCalculationTimeLabel, boolean estimatePDF, org.sm.smtools.application.util.JARResources resources)
IteratorTaskExecutor
object.parentFrame
- a reference to the parent frame (used for temporarily disabling resizing)progressUpdateGlassPane
- a reference to the progress update glass panefractalIterator
- a reference to the fractal iteratorfractalPanel
- a reference to the fractal panelstatusBarCalculationTimeLabel
- a reference to the status bar's calculation time labelestimatePDF
- a boolean
specifying whether or not the PDF of the iteration count should be estimatedresources
- a reference to the JAR resourcesprotected void finishTasks()
finishTasks
in class org.sm.smtools.application.concurrent.TaskExecutor
public IterationBuffer getFractalResultBuffer()
public org.sm.smtools.math.FunctionLookupTable getIterationsPDF()
protected void initialise()
initialise
in class org.sm.smtools.application.concurrent.TaskExecutor
public void prepareTask(org.sm.smtools.application.concurrent.ATask task)
prepareTask
in class org.sm.smtools.application.concurrent.TaskExecutor
task
- the task to preparepublic void setFractalResultBuffer(IterationBuffer fractalResultBuffer)
fractalResultBuffer
- the new fractal result buffer