public class SingleProcessingTask extends AbstractProcessingTask implements IExplicitProcessingTask
virtual mode
is possible.SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
private Class<?> |
caller |
private static org.apache.log4j.Logger |
logger |
childTask, duration, headless, operator, operatorGUI, parentTask, startTime, virtual, workPackage| Constructor and Description |
|---|
SingleProcessingTask() |
SingleProcessingTask(IWorkPackage wp)
This constructor sets the required variables directly.
|
SingleProcessingTask(IWorkPackage wp,
IOperatorGUI opGUI)
This constructor sets the required variables directly.
|
| Modifier and Type | Method and Description |
|---|---|
protected IResult |
doInBackground()
The invocation of
SwingWorker.execute() causes the creation of a new
background swing worker. |
IResult |
processExplicit()
This method performs the actual calculation on a single image.
|
done, getChildTask, getOperator, getOperatorGUI, getParentTask, getWorkPackage, isHeadless, isVirtual, process, setChildTask, setHeadless, setOperator, setOperatorGUI, setParentTask, setVirtual, setWorkPackageaddPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgressprivate Class<?> caller
private static final org.apache.log4j.Logger logger
public SingleProcessingTask()
public SingleProcessingTask(IWorkPackage wp)
headless will be set to true. This constructor
shall be used when no GUI is needed to be updated. virtual
is always false.public SingleProcessingTask(IWorkPackage wp, IOperatorGUI opGUI)
headless will be set to false. This constructor
shall be used when a GUI is needed to be updated. virtual is
always false.public IResult processExplicit() throws Exception
processExplicit in interface IExplicitProcessingTaskIqmDataBox object containing the
processed image/fileException - if the requested operator is not definedprotected IResult doInBackground() throws Exception
SwingWorker.execute() causes the creation of a new
background swing worker. The SwingWorker.get() method has to be called in
order to block on the calling thread and wait for the result. If you want
to do this in one statement, use processExplicit() and the
calculation will be performed in the same thread as the call occurs.doInBackground in class AbstractProcessingTaskIqmDataBox, which is the result of
processExplicit()ExceptionCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.