public class SubProgressListener extends DelegateProgressListener
Example:
if( progress == null ) progress = new NullProgressListener();
progress.started();
progress.setDecsription("Connect");
..connect to data store and obtain feature collection...
progress.progress( 20 ); // connecting represents 20% of the work
progress.setDescription("Process features");
featureCollection.accepts( visitor, new SubProgress( progress, 80 ) );
progress.completed();
delegate| Constructor and Description |
|---|
SubProgressListener(ProgressListener progress,
float amount)
Create a sub progress monitor, used to delegate work to a separate process.
|
SubProgressListener(ProgressListener progress,
float start,
float amount)
Create a sub progress monitor, used to delegate work to a separate process.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Notifies this listener that the operation has finished.
|
float |
getProgress()
Returns the current progress as a percent completed.
|
void |
progress(float progress)
Notifies this listener of progress in the lengthly operation.
|
void |
started()
Notifies this listener that the operation begins.
|
dispose, exceptionOccurred, getDelegate, getTask, isCanceled, setCanceled, setTask, warningOccurredpublic SubProgressListener(ProgressListener progress, float start, float amount)
progress - parent progress to notify as we get work donestart - the starting offset for the progressamount - amount of progress representedpublic SubProgressListener(ProgressListener progress, float amount)
progress - parent progress to notify as we get work doneamount - amount of progress representedpublic void started()
ProgressListenerstarted in interface ProgressListenerstarted in class DelegateProgressListenerpublic void complete()
ProgressListenercomplete in interface ProgressListenercomplete in class DelegateProgressListenerpublic float getProgress()
ProgressListenergetProgress in interface ProgressListenergetProgress in class DelegateProgressListenerpublic void progress(float progress)
ProgressListenerprogress in interface ProgressListenerprogress in class DelegateProgressListenerprogress - The progress as a value between 0 and 100 inclusive.Copyright © 1996–2021 Geotools. All rights reserved.