Re: [OpenMap Users] ProjectionPainter

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 18 Oct 2007 08:27:03 -0400

Hello,

The ProjectionPainter interface is used by the
com.bbn.openmap.image.ImageServer, to create images from the layers.

If you want the layer to paint new information, I suggest you make
your layer extend the OMGraphicHandlerLayer, and override the prepare
() method, returning an OMGraphicList with the OMGraphics you want on
it. Use the DemoLayer as an example.

Hope this helps,

Don



On Oct 12, 2007, at 9:15 AM, EOsorio_at_sisdef.cl wrote:

>
> Hello, I like to implement a Layer where I override the method of
> ProjectionPainter:
> public void renderDataForProjection(Projection proj, Graphics g).
>
> I like have a control of draw over layer.
>
> My class is:
>
> public class InformationLayer extends Layer implements
> ProjectionPainter {
>
> /**
> *
> */
> private static final long serialVersionUID = 1L;
>
> _at_Override
> public void renderDataForProjection(Projection proj,
> Graphics g) {
> if(proj != null && g != null) {
> Graphics2D gg = (Graphics2D)g;
> LatLonPoint center = proj.getCenter();
> Point p = proj.forward(center);
>
> gg.drawOval(p.x, p.y, 10, 10);
>
> }
> }
>
> _at_Override
> public void projectionChanged(ProjectionEvent e) {
>
> repaint();
> }
>
> }
>
> but, never run this method.
>
> Please tell me how can I to use this interface.
>
>
>
> -------------------------------------
> Eliecer Osorio Verdugo
> Gerencia Técnica
> ------------------------------------
> Sisdef Ltda.
> Fono: 56 32 2810777
> Fax : 56 32 2811190
> -------------------------------------
> e-mail: eosorio_at_sisdef.cl
> -------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Oct 18 2007 - 08:29:04 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT