Package com.openindex.openestate.tool
Class ImmoToolTask<T,V>
- java.lang.Object
-
- javax.swing.SwingWorker<T,V>
-
- com.openindex.openestate.tool.ImmoToolTask<T,V>
-
- All Implemented Interfaces:
PropertyChangeListener
,Runnable
,Future<T>
,RunnableFuture<T>
,EventListener
- Direct Known Subclasses:
AgencyBrokeringViewTask
,AgencyContactViewTask
,AgencyEstateContactTask
,AgencyEstateGeoDataTask
,AgencyEstateStatusTask
,AgencyEstateViewTask
,AgencyExportViewTask
,AgencyExposeTask
,AgencyImportTask
,AgencyInterestViewTask
,CalendarEntryRemoveTask
,CalendarEntryViewTask
,CalendarSyncTask
,ContactsEntryExportVcardTask
,ContactsEntryImportVCardTask
,ContactsEntryViewTask
,CrmActivityViewTask
,CrmMarketingViewTask
,CsvExportTask
,CsvImportTask
,DbBackupTask
,DbRebuildTask
,DbReloadTask
,DbRepairTask
,DbRestoreTask
,ExportProcess.PreparationTask
,ExportProcess.TransportTask
,ImmoToolBackupTask
,ImmoToolProjectCloseTask
,ImmoToolProjectCreateTask
,ImmoToolProjectOpenTask
,ImmoToolTaskContainer
,ImmoToolUpdateTask
,MailAccountDialog.SubmitTask
,MailExportTask
,MailImportTask
,NewsDownloadTask
,XlsExportTask
public abstract class ImmoToolTask<T,V> extends SwingWorker<T,V> implements PropertyChangeListener
ImmoToolTask.- Author:
- Andreas Rudolph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmoToolTask.Adapter
static class
ImmoToolTask.Callback
static interface
ImmoToolTask.Listener
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImmoToolTask()
protected
ImmoToolTask(String title)
protected
ImmoToolTask(String title, String description)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListener(ImmoToolTask.Listener l)
protected void
cancelled()
protected void
checkCancelled()
ImmoToolTask.Callback
createCallback()
protected abstract T
doInBackground()
protected void
done()
T
executeAndWait()
T
executeAndWait(long timeout, TimeUnit unit)
protected void
failed(Throwable t)
protected void
finished()
String
getDescription()
long
getId()
String
getMessage()
Window
getParentWindow()
Window
getTaskDialog()
Deprecated.String
getTitle()
static boolean
isCancelException(Throwable ex)
boolean
isPending()
boolean
isStarted()
protected void
process(List<V> chunks)
void
propertyChange(PropertyChangeEvent evt)
void
removeListener(ImmoToolTask.Listener l)
protected void
setDescription(String description)
protected void
setMessage(String message)
void
setParentWindow(Window window)
protected void
setProgress(float percentage)
protected void
setProgress(float value, float min, float max)
protected void
setProgress(int value, int min, int max)
protected void
setProgress(long value, long min, long max)
void
setTaskDialog(Window window)
Deprecated.protected void
setTitle(String title)
protected void
succeeded(T result)
-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Method Detail
-
addListener
public final void addListener(ImmoToolTask.Listener l)
-
cancelled
protected void cancelled()
-
createCallback
public ImmoToolTask.Callback createCallback()
-
checkCancelled
protected void checkCancelled() throws CancellationException
- Throws:
CancellationException
-
doInBackground
protected abstract T doInBackground() throws Exception
- Specified by:
doInBackground
in classSwingWorker<T,V>
- Throws:
Exception
-
done
protected void done()
- Overrides:
done
in classSwingWorker<T,V>
-
executeAndWait
public final T executeAndWait() throws CancellationException, InterruptedException, ExecutionException
-
executeAndWait
public final T executeAndWait(long timeout, TimeUnit unit) throws CancellationException, InterruptedException, ExecutionException, TimeoutException
-
failed
protected void failed(Throwable t)
-
finished
protected void finished()
-
getDescription
public String getDescription()
-
getId
public final long getId()
-
getMessage
public String getMessage()
-
getParentWindow
public Window getParentWindow()
-
getTaskDialog
@Deprecated public Window getTaskDialog()
Deprecated.
-
getTitle
public String getTitle()
-
isCancelException
public static boolean isCancelException(Throwable ex)
-
isPending
public final boolean isPending()
-
isStarted
public final boolean isStarted()
-
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
removeListener
public final void removeListener(ImmoToolTask.Listener l)
-
setDescription
protected void setDescription(String description)
-
setMessage
protected void setMessage(String message)
-
setParentWindow
public void setParentWindow(Window window)
-
setProgress
protected final void setProgress(long value, long min, long max)
-
setProgress
protected final void setProgress(int value, int min, int max)
-
setProgress
protected final void setProgress(float percentage)
-
setProgress
protected final void setProgress(float value, float min, float max)
-
setTaskDialog
@Deprecated public void setTaskDialog(Window window)
Deprecated.
-
setTitle
protected void setTitle(String title)
-
succeeded
protected void succeeded(T result)
-
-