Class HMExecutor
java.lang.Object
javax.swing.SwingWorker<java.lang.Void,org.hortonmachine.gears.ui.progress.ProgressUpdate>
org.hortonmachine.gui.utils.executor.HMExecutor
- All Implemented Interfaces:
java.lang.Runnable,java.util.concurrent.Future<java.lang.Void>,java.util.concurrent.RunnableFuture<java.lang.Void>,org.hortonmachine.gears.ui.progress.IProgressPrinter
- Direct Known Subclasses:
ExecutorIndeterminateGui,ExecutorProgressGui,ExecutorProgressPrintStream
public abstract class HMExecutor
extends javax.swing.SwingWorker<java.lang.Void,org.hortonmachine.gears.ui.progress.ProgressUpdate>
implements org.hortonmachine.gears.ui.progress.IProgressPrinter
An swingworker executor helper to work with a progress printer.
- Author:
- Andrea Antonello (www.hydrologis.com)
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HMExecutor() -
Method Summary
Modifier and Type Method Description abstract voidbackGroundWork()protected java.lang.VoiddoInBackground()voiddone()protected voidprocess(java.util.List<org.hortonmachine.gears.ui.progress.ProgressUpdate> chunks)voidpublish(org.hortonmachine.gears.ui.progress.ProgressUpdate update)voidsetProgressPrinter(org.hortonmachine.gears.ui.progress.IProgressPrinter progress)
-
Field Details
-
Constructor Details
-
HMExecutor
public HMExecutor()
-
-
Method Details
-
setProgressPrinter
public void setProgressPrinter(org.hortonmachine.gears.ui.progress.IProgressPrinter progress) -
process
protected void process(java.util.List<org.hortonmachine.gears.ui.progress.ProgressUpdate> chunks)- Overrides:
processin classjavax.swing.SwingWorker<java.lang.Void,org.hortonmachine.gears.ui.progress.ProgressUpdate>
-
doInBackground
protected java.lang.Void doInBackground()- Specified by:
doInBackgroundin classjavax.swing.SwingWorker<java.lang.Void,org.hortonmachine.gears.ui.progress.ProgressUpdate>
-
backGroundWork
public abstract void backGroundWork() throws java.lang.Exception- Throws:
java.lang.Exception
-
publish
public void publish(org.hortonmachine.gears.ui.progress.ProgressUpdate update)- Specified by:
publishin interfaceorg.hortonmachine.gears.ui.progress.IProgressPrinter
-
done
public void done()- Specified by:
donein interfaceorg.hortonmachine.gears.ui.progress.IProgressPrinter- Overrides:
donein classjavax.swing.SwingWorker<java.lang.Void,org.hortonmachine.gears.ui.progress.ProgressUpdate>
-