Package org.gvsig.utils.swing.threads
Interface IProgressMonitorIF
- All Known Implementing Classes:
ProgressMonitorAdapter,UndefinedProgressMonitor
public interface IProgressMonitorIF
IProgressMonitorIF must be all classes which
monitors the process of a long costly task.
It is designed to monitor defined tasks (those which we know what number of steps have) and undefined tasks.
It must has associated a GUI component to show progress of the task (usually a Progress Bar and a cancel button).
It is designed to monitor defined tasks (those which we know what number of steps have) and undefined tasks.
It must has associated a GUI component to show progress of the task (usually a Progress Bar and a cancel button).
- Author:
- azabala
-
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 componentvoid
-
Method Details
-
setInitialStep
void setInitialStep(int step) sets initial step number of the task monitored- Parameters:
step-
-
setLastStep
void setLastStep(int step) sets final step number of the task monitored- Parameters:
step-
-
setCurrentStep
void setCurrentStep(int step) sets current step number of the task monitored- Parameters:
step-
-
getInitialStep
int getInitialStep() -
getLastStep
int getLastStep() -
getCurrentStep
int getCurrentStep() -
setIndeterminated
void setIndeterminated(boolean indeterminated) Sets if the monitored task is defined (known number of steps) or undefined (unknown)- Parameters:
indeterminated-
-
isIndeterminated
boolean isIndeterminated() -
setBarStringDrawed
void setBarStringDrawed(boolean stringDrawed) Sets if the progress bar associated to monitor must draw a complementary text to progress bar- Parameters:
stringDrawed-
-
setBarString
Sets complementary text to progress bar.- Parameters:
barString-
-
setMainTitleLabel
Set main text of GUI component- Parameters:
text-
-
setNote
-
cancel
void cancel()Sends cancel message to monitored task. -
isCanceled
boolean isCanceled()Returns if has received cancel message- Returns:
-
close
void close()Closes associated GUI component -
open
void open()Sets associated gui component visible
-