org.geotools.util
Class SubProgressListener
java.lang.Object
org.geotools.util.DelegateProgressListener
org.geotools.util.SubProgressListener
- All Implemented Interfaces:
- org.opengis.util.ProgressListener
public class SubProgressListener
- extends DelegateProgressListener
A sub progress monitor, used to delegate a portion of work to a separate process.
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();
- Author:
- Jody
Constructor Summary |
SubProgressListener(org.opengis.util.ProgressListener progress,
float amount)
Create a sub progress monitor, used to delegate work to a separate
process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubProgressListener
public SubProgressListener(org.opengis.util.ProgressListener progress,
float amount)
- Create a sub progress monitor, used to delegate work to a separate
process.
- Parameters:
progress
- parent progress to notify as we get work doneamount
- amount of progress represented
started
public void started()
- Specified by:
started
in interface org.opengis.util.ProgressListener
- Overrides:
started
in class DelegateProgressListener
complete
public void complete()
- Specified by:
complete
in interface org.opengis.util.ProgressListener
- Overrides:
complete
in class DelegateProgressListener
getProgress
public float getProgress()
- Specified by:
getProgress
in interface org.opengis.util.ProgressListener
- Overrides:
getProgress
in class DelegateProgressListener
progress
public void progress(float progress)
- Specified by:
progress
in interface org.opengis.util.ProgressListener
- Overrides:
progress
in class DelegateProgressListener
Copyright © 1996-2010 Geotools. All Rights Reserved.