Class HMProgressMonitorDialog
java.lang.Object
org.hortonmachine.gui.utils.monitor.HMProgressMonitorDialog
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener
public abstract class HMProgressMonitorDialog
extends java.lang.Object
implements java.beans.PropertyChangeListener
Deprecated.
Use
ActionWithProgress if possible.A progress dialog for long background jobs.
- Author:
- Andrea Antonello (www.hydrologis.com)
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringBuilderfinalErrorSbDeprecated.protected java.lang.StringBuilderfinalInfoSbDeprecated.protected javax.swing.ProgressMonitorprogressMonitorDeprecated.protected org.hortonmachine.gui.utils.monitor.HMProgressMonitorDialog.BackgroundTasktaskDeprecated. -
Constructor Summary
Constructors Constructor Description HMProgressMonitorDialog(java.awt.Component parent, java.lang.String title, int workLoad)Deprecated.Create the monitor dialog. -
Method Summary
Modifier and Type Method Description protected booleanisCancelled()Deprecated.static voidmain(java.lang.String[] args)Deprecated.abstract voidpostDoneInUi()Deprecated.Execute something after the progress has finished in the UI thread.abstract voidprocessInBackground()Deprecated.Method inside which the job has to be done in background.voidpropertyChange(java.beans.PropertyChangeEvent evt)Deprecated.Invoked when task's progress property changes.voidrun()Deprecated.Start the job with monitor dialog.voidsetProgress(int progress)Deprecated.voidsetProgressText(java.lang.String text)Deprecated.
-
Field Details
-
progressMonitor
protected javax.swing.ProgressMonitor progressMonitorDeprecated. -
task
protected org.hortonmachine.gui.utils.monitor.HMProgressMonitorDialog.BackgroundTask taskDeprecated. -
finalInfoSb
protected java.lang.StringBuilder finalInfoSbDeprecated. -
finalErrorSb
protected java.lang.StringBuilder finalErrorSbDeprecated.
-
-
Constructor Details
-
HMProgressMonitorDialog
public HMProgressMonitorDialog(java.awt.Component parent, java.lang.String title, int workLoad)Deprecated.Create the monitor dialog.- Parameters:
parent- the parent component.title- the title of the monitor dialog.workLoad- the maximum work to do.
-
-
Method Details
-
run
public void run()Deprecated.Start the job with monitor dialog. -
processInBackground
public abstract void processInBackground() throws java.lang.ExceptionDeprecated.Method inside which the job has to be done in background.- update progress bar with
progressMonitor.setProgress(0); - update progress text with
setProgressText("My message");
- Throws:
java.lang.Exception
- update progress bar with
-
postDoneInUi
public abstract void postDoneInUi()Deprecated.Execute something after the progress has finished in the UI thread. -
isCancelled
protected boolean isCancelled()Deprecated. -
setProgressText
public void setProgressText(java.lang.String text)Deprecated. -
setProgress
public void setProgress(int progress)Deprecated. -
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)Deprecated.Invoked when task's progress property changes.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
main
public static void main(java.lang.String[] args)Deprecated.
-