public interface ProjectionPainter
This is different from the usual paradigm of OpenMap components. Since OpenMap components are Swing components, they usually ready themselves, call repaint() on themselves, and then wait for the Swing thread to call paint and supply a Graphics object. This leads to uncertainty as to when the painting is actually completed, which can be an issue if you are trying to create an image, or something like that.
Some layers kick off a SwingWorker thread to do the work. If a layer is modified to implement this interface, the layer should do all the graphics collection work and rendering in the calling thread, so the caller knows that the contribution to the map from this ProjectionPainter is complete.
Modifier and Type | Method and Description |
---|---|
void |
renderDataForProjection(Projection proj,
java.awt.Graphics g)
Given a projection and Graphics, paint graphic objects inside
the Graphics.
|
void renderDataForProjection(Projection proj, java.awt.Graphics g)
proj
- a com.bbn.openmap.proj.Projection that describes a
map.g
- a java.awt.Graphics to draw into.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details