Class 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 Detail

      • RenderingTask

        public RenderingTask​(MapContent mapContent,
                             Graphics2D destinationGraphics,
                             GTRenderer renderer)
        Creates a new rendering task.
    • 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()