Package org.gvsig.utils.swing.threads
Class ProgressMonitorAdapter
java.lang.Object
org.gvsig.utils.swing.threads.ProgressMonitorAdapter
- All Implemented Interfaces:
IProgressMonitorIF
It is a try to launch tasks in background and to report its evolution
with javax.swing.ProgressMonitor.
It isnt satisfactory at all (because we cant control
when dialog is showed, etc)
- Author:
- azabala
-
Constructor Summary
ConstructorsConstructorDescriptionProgressMonitorAdapter(Component parent, String statusMessage, String note, int minimum, int maximum, int currentValue) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Sends cancel message to monitored task.voidclose()Closes associated GUI componentintintintbooleanReturns if has received cancel messagebooleanvoidopen()Sets associated gui component visiblevoidsetBarString(String barString) Sets complementary text to progress bar.voidsetBarStringDrawed(boolean stringDrawed) Sets if the progress bar associated to monitor must draw a complementary text to progress barvoidsetCurrentStep(int step) sets current step number of the task monitoredvoidsetIndeterminated(boolean indeterminated) Sets if the monitored task is defined (known number of steps) or undefined (unknown)voidsetInitialStep(int step) sets initial step number of the task monitoredvoidsetLastStep(int step) sets final step number of the task monitoredvoidsetMainTitleLabel(String text) Set main text of GUI componentvoidvoid
-
Constructor Details
-
ProgressMonitorAdapter
-
-
Method Details
-
setInitialStep
public void setInitialStep(int step) Description copied from interface:IProgressMonitorIFsets initial step number of the task monitored- Specified by:
setInitialStepin interfaceIProgressMonitorIF- Parameters:
step-
-
setLastStep
public void setLastStep(int step) Description copied from interface:IProgressMonitorIFsets final step number of the task monitored- Specified by:
setLastStepin interfaceIProgressMonitorIF- Parameters:
step-
-
setCurrentStep
public void setCurrentStep(int step) Description copied from interface:IProgressMonitorIFsets current step number of the task monitored- Specified by:
setCurrentStepin interfaceIProgressMonitorIF- Parameters:
step-
-
getInitialStep
public int getInitialStep()- Specified by:
getInitialStepin interfaceIProgressMonitorIF
-
getLastStep
public int getLastStep()- Specified by:
getLastStepin interfaceIProgressMonitorIF
-
getCurrentStep
public int getCurrentStep()- Specified by:
getCurrentStepin interfaceIProgressMonitorIF
-
setIndeterminated
public void setIndeterminated(boolean indeterminated) Description copied from interface:IProgressMonitorIFSets if the monitored task is defined (known number of steps) or undefined (unknown)- Specified by:
setIndeterminatedin interfaceIProgressMonitorIF- Parameters:
indeterminated-
-
isIndeterminated
public boolean isIndeterminated()- Specified by:
isIndeterminatedin interfaceIProgressMonitorIF
-
setBarStringDrawed
public void setBarStringDrawed(boolean stringDrawed) Description copied from interface:IProgressMonitorIFSets if the progress bar associated to monitor must draw a complementary text to progress bar- Specified by:
setBarStringDrawedin interfaceIProgressMonitorIF- Parameters:
stringDrawed-
-
setBarString
Description copied from interface:IProgressMonitorIFSets complementary text to progress bar.- Specified by:
setBarStringin interfaceIProgressMonitorIF- Parameters:
barString-
-
setMainTitleLabel
Description copied from interface:IProgressMonitorIFSet main text of GUI component- Specified by:
setMainTitleLabelin interfaceIProgressMonitorIF- Parameters:
text-
-
setNote
- Specified by:
setNotein interfaceIProgressMonitorIF
-
cancel
public void cancel()Description copied from interface:IProgressMonitorIFSends cancel message to monitored task.- Specified by:
cancelin interfaceIProgressMonitorIF
-
isCanceled
public boolean isCanceled()Description copied from interface:IProgressMonitorIFReturns if has received cancel message- Specified by:
isCanceledin interfaceIProgressMonitorIF- Returns:
-
taskInBackground
public void taskInBackground() -
close
public void close()Description copied from interface:IProgressMonitorIFCloses associated GUI component- Specified by:
closein interfaceIProgressMonitorIF
-
open
public void open()Description copied from interface:IProgressMonitorIFSets associated gui component visible- Specified by:
openin interfaceIProgressMonitorIF
-