Class SimpleRenderer
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.renderer.SimpleRenderer
-
- All Implemented Interfaces:
Renderer
- Direct Known Subclasses:
GridRenderer
,ScaleBarRenderer
,SimpleFeatureCollectionRenderer
public abstract class SimpleRenderer extends Object implements Renderer
Advantage over ImageCachingRenderer: no cached image (typically 1 MB each). Disadvantage: must redraw image each time (slower). Classic tradeoff between space and time.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.locationtech.jts.jump.workbench.ui.renderer.Renderer
Renderer.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected LayerViewPanel
panel
-
Constructor Summary
Constructors Constructor Description SimpleRenderer(Object contentID, LayerViewPanel panel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cancel()
void
clearImageCache()
void
copyTo(Graphics2D graphics)
Runnable
createRunnable()
Object
getContentID()
boolean
isRendering()
protected abstract void
paint(Graphics2D g)
-
-
-
Field Detail
-
panel
protected LayerViewPanel panel
-
-
Constructor Detail
-
SimpleRenderer
public SimpleRenderer(Object contentID, LayerViewPanel panel)
-
-
Method Detail
-
paint
protected abstract void paint(Graphics2D g) throws Exception
- Throws:
Exception
-
clearImageCache
public void clearImageCache()
- Specified by:
clearImageCache
in interfaceRenderer
-
isRendering
public boolean isRendering()
- Specified by:
isRendering
in interfaceRenderer
-
getContentID
public Object getContentID()
- Specified by:
getContentID
in interfaceRenderer
-
copyTo
public void copyTo(Graphics2D graphics)
-
createRunnable
public Runnable createRunnable()
- Specified by:
createRunnable
in interfaceRenderer
- Returns:
- null if no rendering work needs to be done
-
-