Package whistleClassifier.training
Class BatchTrainingWorker
java.lang.Object
javax.swing.SwingWorker<Integer,BatchTrainingProgress>
whistleClassifier.training.BatchTrainingWorker
- All Implemented Interfaces:
Runnable
,Future<Integer>
,RunnableFuture<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorsConstructorDescriptionBatchTrainingWorker
(ClassifierTrainingDialog classifierTrainingDialog, BatchTrainingParams batchTrainingParams, BatchTrainingMonitor batchTrainingMonitor) -
Method Summary
Modifier and TypeMethodDescriptionprotected Integer
protected void
done()
protected void
process
(List<BatchTrainingProgress> chunks) void
setStatus
(ClassifierTrainingProgress bootstrapProgress) this should get status messages back from the main bootstrap dialog.void
stopNow()
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
BatchTrainingWorker
public BatchTrainingWorker(ClassifierTrainingDialog classifierTrainingDialog, BatchTrainingParams batchTrainingParams, BatchTrainingMonitor batchTrainingMonitor)
-
-
Method Details
-
doInBackground
- Specified by:
doInBackground
in classSwingWorker<Integer,
BatchTrainingProgress> - Throws:
Exception
-
done
protected void done()- Overrides:
done
in classSwingWorker<Integer,
BatchTrainingProgress>
-
process
- Overrides:
process
in classSwingWorker<Integer,
BatchTrainingProgress>
-
stopNow
public void stopNow() -
setStatus
this should get status messages back from the main bootstrap dialog. These probably arrive in the AWT thread, so the swing worker thread will just have to monitor these flags and wait for them to change before it can proceed.- Parameters:
statusMessage
-statusValue
-
-