org.gdal.gdal
Class TermProgressCallback

java.lang.Object
  extended by org.gdal.gdal.ProgressCallback
      extended by org.gdal.gdal.TermProgressCallback

public class TermProgressCallback
extends ProgressCallback

Class used for simple progress report to terminal.

This progress reporter prints simple progress report to the terminal window. The progress report generally looks something like this:

  0...10...20...30...40...50...60...70...80...90...100 - done.
 
Every 2.5% of progress another number or period is emitted. Note that GDALTermProgress() uses internal static data to keep track of the last percentage reported and will get confused if two terminal based progress reportings are active at the same time eithin in a single thread or across multiple threads.

Example :

 driver.CreateCopy("dest.tif", src_ds, 0, null, new TermProgressCallback());
 

Since:
Java bindings 1.7.0

Constructor Summary
TermProgressCallback()
           
 
Method Summary
 void delete()
           
 int run(double dfComplete, String pszMessage)
          Callback method called from long processing from GDAL methods.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermProgressCallback

public TermProgressCallback()
Method Detail

delete

public void delete()
Overrides:
delete in class ProgressCallback

run

public int run(double dfComplete,
               String pszMessage)
Description copied from class: ProgressCallback
Callback method called from long processing from GDAL methods.

This method is called back with the progression percentage. Its return value is used by the caller to determine whether the processing should go on or be interrupted.

This method should be subclassed by classes subclassing ProgressCallback.

Overrides:
run in class ProgressCallback
Parameters:
dfComplete - progression percentage between 0 and 1
pszMessage - processing message, may be null
Returns:
0 if you want to interrupt the processing, any value different from 0 to go on