Class RenderingManager


  • public class RenderingManager
    extends Object
    RenderingManager is in charge of rendering a map to the LayerViewPanel, to a file (image, pdf...) or to external device (printer).
    • Field Detail

      • layerableClassToRendererFactoryMap

        protected static HashMap layerableClassToRendererFactoryMap
        Deprecated.
      • USE_MULTI_RENDERING_THREAD_QUEUE_KEY

        public static final String USE_MULTI_RENDERING_THREAD_QUEUE_KEY
        See Also:
        ThreadQueue
      • EXECUTE_ON_EVENT_THREAD

        public static final int EXECUTE_ON_EVENT_THREAD
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • setRenderingMode

        public void setRenderingMode​(int mode)
        Set the rendering mode
        Parameters:
        mode - : INTERACTIVE, SINGLE_THREAD_QUEUE, or EXECUTE_ON_EVENT_THREAD
      • setRenderingMode

        public void setRenderingMode​(Runnable notify,
                                     int mode)
        Set the rendering mode
        Parameters:
        notify - : Runnable that will be executed after rendering completes depending on the mode
        mode - : INTERACTIVE, SINGLE_THREAD_QUEUE, or EXECUTE_ON_EVENT_THREAD
      • getRenderingMode

        public int getRenderingMode()
        Returns:
        rendering mode: INTERACTIVE, SINGLE_THREAD_QUEUE, or EXECUTE_ON_EVENT_THREAD
      • renderAll

        public void renderAll()
      • contentIDs

        protected List<Object> contentIDs()
      • render

        public void render​(Object contentID)
      • render

        public void render​(Object contentID,
                           boolean clearImageCache)
      • repaintPanel

        public void repaintPanel()
      • createRenderer

        public Renderer createRenderer​(Object contentID)
        Creates a Renderer suitable for this contentID. this method is called by method render().
        Parameters:
        contentID - the contentID, generally a Layerable
        Returns:
        a Renderer to render this content
      • setPaintingEnabled

        public void setPaintingEnabled​(boolean paintingEnabled)
      • copyTo

        public void copyTo​(Graphics2D destination)
      • getDefaultRendererThreadQueue

        public ThreadQueue getDefaultRendererThreadQueue()
      • dispose

        public void dispose()
      • getMaxFeatures

        public int getMaxFeatures()
        Returns:
        Returns the number of maxFeatures to render as vector graphic.
      • setMaxFeatures

        public void setMaxFeatures​(int maxFeatures)
        Parameters:
        maxFeatures - The maximum number of Features to render as vector graphic.

        Use this method before using method render(Object contentID) or render(Object contentID, boolean clearImageCache)

      • removeLayerRenderer

        public void removeLayerRenderer​(Object contentID)
        Remove the LayerRenderer when a Layer is removed (helps to free the memory) Added on 2007-05-21 [Michael Michaud and Larry Becker] Called by LayerManager
        Parameters:
        contentID - layer to remove
      • getRendererFactory

        public static RendererFactory getRendererFactory​(Class clazz)
        Get the renderer factory for the class.
        Parameters:
        clazz - The class
        Returns:
        The renderer factory.
      • setRendererFactory

        public static void setRendererFactory​(Class clazz,
                                              RendererFactory factory)
        Set the renderer factory for the class.
        Parameters:
        clazz - The class
        factory - The renderer factory.