org.geotoolkit.gui.swing.image
Interface MosaicPerformanceGraph.Delayed

All Known Implementing Classes:
MosaicBuilderEditor
Enclosing class:
MosaicPerformanceGraph

public static interface MosaicPerformanceGraph.Delayed

Specifies a mosaic to be profiled in a background thread. An instance of this interface can be given to the MosaicPerformanceGraph.plotLater(String, Delayed, long) method. The methods defined in this interface will be called in a background thread some time after plotLater. The workflow is as below:

  1. An instance of Delayed is given to the plotLater method.

  2. A background thread will sleep the specified amount of time. If plotLater is invoked again while the background thread is sleeping, then the old Delayed instance is discarded and replaced by the new one.

  3. After the above delay, the getTileManager() method is invoked in the background thread. The returned mosaic is given to MosaicPerformanceGraph.plotEfficiency(String, TileManager).

  4. After the plotEfficiency method terminated, exactly one of the following methods is invoked in the Swing thread:

Since:
3.00
Version:
3.00
Author:
Martin Desruisseaux (Geomatys)
Module:
display/geotk-widgets-swing (download)    View source code for this class

Method Summary
 void done(TileManager mosaic)
          Invoked on the Swing thread after the profiling has been completed.
 void failed(Throwable exception)
          Invoked on the Swing thread if an exception occurred during the profiling.
 TileManager getTileManager()
          Returns the mosaic to profile.
 

Method Detail

getTileManager

TileManager getTileManager()
                           throws IOException
Returns the mosaic to profile. This method is invoked in a background thread before the profiling begin.

Returns:
The mosaic as a tile manager.
Throws:
IOException - if an I/O operation was required and failed.

done

void done(TileManager mosaic)
Invoked on the Swing thread after the profiling has been completed. This is usually the instance returned by getTileManager().

Parameters:
mosaic - The mosaic which has been profiled.

failed

void failed(Throwable exception)
Invoked on the Swing thread if an exception occurred during the profiling.

Parameters:
exception - The exception which occurred.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.