Class RenderingManager
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.renderer.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 Summary
Fields Modifier and Type Field Description static int
EXECUTE_ON_EVENT_THREAD
static int
INTERACTIVE
protected static HashMap
layerableClassToRendererFactoryMap
Deprecated.static int
SINGLE_THREAD_QUEUE
static String
USE_MULTI_RENDERING_THREAD_QUEUE_KEY
-
Constructor Summary
Constructors Constructor Description RenderingManager(LayerViewPanel panel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected List<Object>
contentIDs()
void
copyTo(Graphics2D destination)
Renderer
createRenderer(Object contentID)
Creates a Renderer suitable for this contentID.void
dispose()
ThreadQueue
getDefaultRendererThreadQueue()
int
getMaxFeatures()
LayerViewPanel
getPanel()
Renderer
getRenderer(Object contentID)
static RendererFactory
getRendererFactory(Class clazz)
Get the renderer factory for the class.static Renderer.ContentDependendFactory
getRenderFactoryForLayerable(Class clss)
Deprecated.int
getRenderingMode()
void
putAboveLayerables(Object contentID, Renderer.Factory factory)
void
putBelowLayerables(Object contentID, Renderer.Factory factory)
static void
putRendererForLayerable(Class clazz, Renderer.ContentDependendFactory rendererFactory)
Deprecated.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 LayerManagervoid
render(Object contentID)
void
render(Object contentID, boolean clearImageCache)
void
renderAll()
void
repaintPanel()
void
setMaxFeatures(int maxFeatures)
void
setPaintingEnabled(boolean paintingEnabled)
static void
setRendererFactory(Class clazz, RendererFactory factory)
Set the renderer factory for the class.void
setRenderingMode(int mode)
Set the rendering modevoid
setRenderingMode(Runnable notify, int mode)
Set the rendering mode
-
-
-
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
-
INTERACTIVE
public static final int INTERACTIVE
- See Also:
- Constant Field Values
-
SINGLE_THREAD_QUEUE
public static final int SINGLE_THREAD_QUEUE
- See Also:
- Constant Field Values
-
EXECUTE_ON_EVENT_THREAD
public static final int EXECUTE_ON_EVENT_THREAD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RenderingManager
public RenderingManager(LayerViewPanel panel)
-
-
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 modemode
- : 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
-
putBelowLayerables
public void putBelowLayerables(Object contentID, Renderer.Factory factory)
-
putAboveLayerables
public void putAboveLayerables(Object contentID, Renderer.Factory factory)
-
renderAll
public void renderAll()
-
render
public void render(Object contentID)
-
render
public void render(Object contentID, boolean clearImageCache)
-
repaintPanel
public void repaintPanel()
-
getRenderFactoryForLayerable
public static Renderer.ContentDependendFactory getRenderFactoryForLayerable(Class clss)
Deprecated.
-
putRendererForLayerable
public static void putRendererForLayerable(Class clazz, Renderer.ContentDependendFactory rendererFactory)
Deprecated.- Parameters:
clazz
- Class of the LayerrendererFactory
- a Renderer.ContentDependendFactory
-
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()
-
getPanel
public LayerViewPanel getPanel()
-
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 classfactory
- The renderer factory.
-
-