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, warningOccurred
public 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()
ProgressListener
started
in interface ProgressListener
started
in class DelegateProgressListener
public void complete()
ProgressListener
complete
in interface ProgressListener
complete
in class DelegateProgressListener
public float getProgress()
ProgressListener
getProgress
in interface ProgressListener
getProgress
in class DelegateProgressListener
public void progress(float progress)
ProgressListener
progress
in interface ProgressListener
progress
in class DelegateProgressListener
progress
- The progress as a value between 0 and 100 inclusive.Copyright © 1996–2023 Geotools. All rights reserved.