Package be.gaudry.model.thread
Class AbstractBrolWorker<T>
- Type Parameters:
T- the result type returned by thisWorker'sdoInBackgroundandgetmethods
- All Implemented Interfaces:
INotifier,Runnable,Future<T>,RunnableFuture<T>
- Direct Known Subclasses:
AbstractCrudPanel.LoadListWorker,BibliobrolMainPanel.LoadCatalogsWorker,BiblioBrolMenuBar.LoadImagesWorker,BrolsPanel.LoadListWorker,CewePanel.Cewe2PdfWorker,CrudListPanel.LoadListWorker,EidPanel.EIDReadWorker,FileChartTablePanel.BuildChartWorker,MediaCleanerOptionsPanel.MediaCleanerWorker,MReporterPanel.MediaReportWorker,NfoRenamerPanel.RenameFilesWorker,OldRenamerMainPanel.RenamerWorker,PersonInfoPanel.LoadListWorker,RefreshSynchroPanel.RefreshSynchroPanelWorker,RenamerMainPanel.SearchFilesWorker,Runtastic2GpxPanel.Runtastic2GPXWorker,SearchMediaPanel.SearchMediaWorker,SimpleRenamerPanel.RenameFilesWorker,SplashWorker,StatusableWorker,SynchroUpdaterWorker,TransfertPhotosPanel.TransfertPhotosWorker
public abstract class AbstractBrolWorker<T>
extends SwingWorker<T,ProgressResult>
implements INotifier
An abstract class to perform lengthy GUI-interacting tasks in a
dedicated thread.
Provided by the broldev.core.model project.
- Since:
- 1.0 Jun 10, 2008, broldev.core.model 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 Jun 10, 2008
- Author:
- Steph GAUDRY
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPaused()voidreportProgress(int infoPg)Reports an action wich may be done by the user interface.voidreportProgress(int infoPg, Object[] result)voidreportProgress(int infoPg, String infoStr)Reports some informations and what the user interface may do with these informations.voidreportProgress(String infoStr)Reports some information to display.
Uses theCURRENT_INFOvalue.voidsetPaused(boolean paused)voidMethods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, doInBackground, done, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
-
Constructor Details
-
AbstractBrolWorker
public AbstractBrolWorker()
-
-
Method Details
-
isPaused
public boolean isPaused()- Returns:
- true if paused
-
setPaused
public void setPaused(boolean paused)- Parameters:
paused- the pause status to set
-
togglePause
public void togglePause() -
reportProgress
Reports some information to display.
Uses theCURRENT_INFOvalue.- Specified by:
reportProgressin interfaceINotifier- Parameters:
infoStr- Informations to display
-
reportProgress
Reports some informations and what the user interface may do with these informations.- Specified by:
reportProgressin interfaceINotifier- Parameters:
infoPg-ProgressInfofor negative values, or progress percentageinfoStr- Some additional informations- See Also:
EProgressInfo
-
reportProgress
- Specified by:
reportProgressin interfaceINotifier- Parameters:
infoPg-ProgressInfofor negative values, or progress percentageresult- Values to report- See Also:
EProgressInfo
-
reportProgress
public void reportProgress(int infoPg)Reports an action wich may be done by the user interface.- Specified by:
reportProgressin interfaceINotifier- Parameters:
infoPg-ProgressInfofor negative values, or progress percentage- See Also:
EProgressInfo
-