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 classImmoToolTask.Adapterstatic classImmoToolTask.Callbackstatic interfaceImmoToolTask.Listener-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedImmoToolTask()protectedImmoToolTask(String title)protectedImmoToolTask(String title, String description)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddListener(ImmoToolTask.Listener l)protected voidcancelled()protected voidcheckCancelled()ImmoToolTask.CallbackcreateCallback()protected abstract TdoInBackground()protected voiddone()TexecuteAndWait()TexecuteAndWait(long timeout, TimeUnit unit)protected voidfailed(Throwable t)protected voidfinished()StringgetDescription()longgetId()StringgetMessage()WindowgetParentWindow()WindowgetTaskDialog()Deprecated.StringgetTitle()static booleanisCancelException(Throwable ex)booleanisPending()booleanisStarted()protected voidprocess(List<V> chunks)voidpropertyChange(PropertyChangeEvent evt)voidremoveListener(ImmoToolTask.Listener l)protected voidsetDescription(String description)protected voidsetMessage(String message)voidsetParentWindow(Window window)protected voidsetProgress(float percentage)protected voidsetProgress(float value, float min, float max)protected voidsetProgress(int value, int min, int max)protected voidsetProgress(long value, long min, long max)voidsetTaskDialog(Window window)Deprecated.protected voidsetTitle(String title)protected voidsucceeded(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:
doInBackgroundin classSwingWorker<T,V>- Throws:
Exception
-
done
protected void done()
- Overrides:
donein 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:
propertyChangein 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)
-
-