ProjectionPainter (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap
Interface ProjectionPainter

All Known Implementing Classes:
  AmpLinkLayer, AOILayer, AreaShapeLayer, ASRPLayer, BasicLayer, BoundsTestLayer, BufferedLayer, BufferedLinkLayer, BufferedShapeLayer, CacheLayer, DateLayer, DayNightLayer, DemoLayer, DrawingToolLayer, DrawLinkLayer, DTEDCoverageLayer, DTEDFrameCacheLayer, DTEDLayer, E00Layer, EarthquakeLayer, EditorLayer, EsriLayer, ETOPOJarLayer, ETOPOLayer, EventLayer, GeoCrossDemoLayer, GeoIntersectionLayer, GeoTestLayer, GraticuleLayer, HelloWorldLayer, ImageTileLayer, InteractionLayer, LabelLayer, Layer, LinkLayer, LocationLayer, MapTileLayer, MapTileUtilLayer, MIFLayer, MultiRoadLayer, MultiShapeLayer, MysqlGeometryLayer, NexradLayer, OMGraphicHandlerLayer, OverviewMapAreaLayer, PlotLayer, PlugInLayer, ProjectionResponseLayer, RpfLayer, ScaleDisplayLayer, ScaleFilterLayer, ShapeLayer, SimpleAnimationLayer, SimpleBeanLayer, SinkLayer, TerrainLayer, TestLayer, TimelineLayer, TimerLocationLayer, TimeSliderLayer, VPFFeatureLayer, VPFLayer, VPFRoadLayer

    public interface ProjectionPainter

The ProjectionPainter interface is intended for objects that can manage graphics and draw them into a Java Graphics object. The idea is that the ProjectionPainter, all within one thread, gathers the graphics that reside within the projection, and render them into the Graphics that has been set up for that projection. The height and width of the projection should match the Graphics height and width, in case some of the graphics from the ProjectionPainter depend on them to place themselves within the Graphics.

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.

Method Summary
`void` | `renderDataForProjection(Projection proj, java.awt.Graphics g)` Given a projection and Graphics, paint graphic objects inside the Graphics.

Method Detail

### renderDataForProjection

    void renderDataForProjection(Projection proj,
                                 java.awt.Graphics g)

  Given a projection and Graphics, paint graphic objects inside the Graphics. When this function returns, everything should be all set.

  Parameters:
    `proj` - a com.bbn.openmap.proj.Projection that describes a map.
    `g` - a java.awt.Graphics to draw into.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details