org.geotools.swing
Class RenderingTask

Object
  extended by RenderingTask
All Implemented Interfaces:
Callable<Boolean>, RenderListener

public class RenderingTask
extends Object
implements Callable<Boolean>, RenderListener

A rendering task to be run by a RenderingExecutor.

Since:
8.0
Author:
Michael Bedward

Constructor Summary
RenderingTask(MapContent mapContent, Graphics2D destinationGraphics, GTRenderer renderer)
          Creates a new rendering task.
 
Method Summary
 Boolean call()
          Called by the executor to run this rendering task.
 void cancel()
           
 void errorOccurred(Exception e)
          Called by the renderer on error
 void featureRenderer(SimpleFeature feature)
          Called by the renderer when each feature is drawn.
 boolean isCancelled()
           
 boolean isFailed()
           
 boolean isRunning()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderingTask

public RenderingTask(MapContent mapContent,
                     Graphics2D destinationGraphics,
                     GTRenderer renderer)
Creates a new rendering task.

Parameters:
mapContent -
renderer -
graphics -
Method Detail

cancel

public void cancel()

call

public Boolean call()
             throws Exception
Called by the executor to run this rendering task.

Specified by:
call in interface Callable<Boolean>
Returns:
result of the task: completed or failed
Throws:
Exception

featureRenderer

public void featureRenderer(SimpleFeature feature)
Called by the renderer when each feature is drawn. This implementation does nothing.

Specified by:
featureRenderer in interface RenderListener
Parameters:
feature - the feature just drawn

errorOccurred

public void errorOccurred(Exception e)
Called by the renderer on error

Specified by:
errorOccurred in interface RenderListener
Parameters:
e - cause of the error

isRunning

public boolean isRunning()

isFailed

public boolean isFailed()

isCancelled

public boolean isCancelled()


Copyright © 1996-2014 Geotools. All Rights Reserved.