Re: [OpenMap Users] Adding name to OMGraphics?

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Jul 22 2003 - 11:32:16 EDT

Hi Piotr,

On Monday, July 21, 2003, at 03:40 AM, Piotr Kamiński wrote:

> Hello,
> I wrote last week about enhancing OMDrawingTool. There is another

Thanks for sending that code in last week, I'm still working with it.

> problem I found. If I draw some objects in DrawingLayer I can
> select them (using mouse click in gestures mode) to edition. But how
> can I remove such object?

If you are using 4.6, you can add the
com.bbn.openmap.gui.OMGraphicDeleteTool to the openmap.components
property, and a button will appear on the ToolPanel that lets you
delete any selected OMGraphic. The pop-up menu that is provided by the
OMDrawingTool on a right-click or cntrl-click also has a delete option.

> I'd like to see list of OMGraphics object added to particular
> DrawingLayer.
> This list could be displayed in layer's palette in separated tab, or
> something.
> User could select objects on this list, selected object should be
> automaticaly selected on map and user could start editing it. He/she
> can also remove
> object from list (and layer). Such list helps in orientation what I
> really
> drew.
> List can be make easly but I'd like to see not only OMGraphic class
> but rather name of particular OMGraphi object. Is there any
> possibility to
> attach name to OMGraphic objects? I could use 'appObject' field for
> this
> but it might be use in other way in some applications.

Since there are so many applications where a name isn't used for
OMGraphics, I'd rather not permanently add it to the API for
OMGraphics. Seems like you could get the same functionality with a
java.util.Map, and extending a DrawingLayer to present that list for
you in its palette.

> By the way: Decorated Splines doesn't renders in my configuration,.
> (I use OpenMap 4.6 version). It seems working when I'm clicking on
> map points are added but nothing is drawn. Sometimes I could even
> select such 'invisible' object for edition but still nothing is drawn.

So they don't appear in the DemoLayer for you? Are you creating them
programmatically or using the DrawingTool?

> I've also found that OMSpline object is not serializable. I can't use
> it in my drawings if I want to store them in files on disk.

The readObject/writeObject methods might have to be modified to adjust
for the parameters they have that may not be serializable. I'll put
that on the list, but I'm not sure it'll be changed before 4.6 gets
released.

Regards,

Don

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jul 22 11:34:48 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT