RE: [OpenMap Users] RE: Attaching Grabbers To ORect

From: Chris Allport <chris.allport_at_red-inc.us>
Date: Fri, 25 Mar 2005 13:37:08 -0500

Okay.....try this....

// Declare this where you would usually declare a OMGraphicList
EditableOMGraphicList list = new EditableOMGraphicList();

// In your graphic creation method
OMRect rect = new OMRect(.......fill in coordinates as appropriate....,
OMGraphic.LINETYPE_GREATCIRCLE);
rect.setFillPaint(Color.red);
EditableOMRect erect = new EditableOMRect(rect);

list.add(erect);


// In your paint method, add
list.render(g);

// And in projectionChanged, add (before the repaint)
list.setProjection(e.getProjection());


**
That made it show up in my app.

-Chris

  -----Original Message-----
  From: Steve Frierdich [mailto:sfrierdich_at_custom-mfg-eng.com]
  Sent: Friday, March 25, 2005 11:59 AM
  To: chris.allport_at_red-inc.us
  Subject: Re: [OpenMap Users] RE: Attaching Grabbers To ORect


  Just thought maybe you found and easy way to inherit from the
EditableOMRect class and to display OMRects that had the grabbers displayed
in a layer, and like is done in the openmap example application. If you see
or find out anyone who might have done this and has some source they could
send me would you let me know?
  Thanks
  Steve
  Chris Allport wrote:
    No, I have never used EditableOMRect. In my software, I have a "custom
implementation" of grabbing objects and moving them around. To answer your
question, I looked around the source to help find some answers.

    If you need to track down some help, you should be able to start with
opemap-4.6.x/src/openmap/com/bbn/openmap/examples/OpenMap.java.

    You can run that app:
        java -cp <path_to_openmap.jar>/openmap.jar
com.bbn.openmap.examples.OpenMap

    and see some grabbable objects. I did not fully track down where the
grabbable objects were coming from. EditableOMRect is just my best guess --
and where I would start.

    hth-

    Chris


      -----Original Message-----
      From: Steve Frierdich [mailto:sfrierdich_at_custom-mfg-eng.com]
      Sent: Friday, March 25, 2005 11:02 AM
      To: chris.allport_at_red-inc.us
      Subject: Re: [OpenMap Users] RE: Attaching Grabbers To ORect


      Chris
       Do you have any source code showing a rectangle being drawn showing
the grabbers on an OMRect being displayed?
      Thanks
      Steve

      Chris Allport wrote:
Checkout EditableOMRect. I think this might be what you want.


-----Original Message-----
From: Steve Frierdich [mailto:sfrierdich_at_custom-mfg-eng.com]
Sent: Thursday, March 24, 2005 6:45 PM
To: chris.allport_at_red-inc.us
Subject: Attaching Grabbers To ORect


I am using an ORect object along with an OMGraphicList to an move an
ORect around on a layer. I would like to attached the grabbers to the
ORect like is done in the Openmap’s example. Do you know oh how I might
be able to get the grabbers to attach on the ORect on the layer?

Thanks

Steve

Chris Allport wrote:

  My application has objects moving around on a map. Once in a while,
alerts
will come in for an object and this alert should be displayed at some
position offset from the object. When the object moves, the alert's
position should be updated (relative to the object).

Does OpenMap currently have any support for this type of functionality? If
not, I shall attempt to contribute this capability if you think it might be
welcome.

Thanks in advance-

Chris

--
Chris Allport
Unmanned Systems Research & Development Lab
Patuxent River Naval Air Station
Phone: (301) 904-5943
--
[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"]
--
[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"]
--
[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 Fri Mar 25 2005 - 13:39:33 EST

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