Re: [OpenMap Users] creating new drawing tools

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 22 Feb 2005 17:24:28 -0500

Hi Raj,

I don't know that you would need to extend the drawing tool to do this.
  If you call

drawingTool.create(className, GraphicAttributes, DrawingToolRequestor,
showGUIBoolean),

it returns the OMGraphic it will start manipulating when it receives
mouse events. You can set the unique ID as an attribute on that
OMGraphic (OpenMap 4.6.2, or use the appObject in OMGraphic before
that).

The com.bbn.openmap.layer.editor package might have the stuff you need,
look at the DrawingToolEditor as it's used by an EditorLayer. The
EditorLayer is an OMGraphicHandlerLayer with the ability to smoothly
integrate the OMDrawingTool. This layer is added to the default
application as the DrawingLayerTool. One thing to notice is that the
buttons to enable the drawing tool for different settings are in the
toolbar, and that the OMGraphics are created on the fly. You could
change the layer/tool to do the same thing without the buttons, setting
up the drawing tool programmatically instead. The main thing I wanted
to point out is that when you switch to Gestures mouse mode and then
click on an OMGraphic, you can move them, even though the Gestures
mouse mode still appears active. That's the drawing tool using the
Gestures mouse mode as a proxy, which may be another behavior you want
to use.

Hope this helps,

Don

On Feb 21, 2005, at 10:12 PM, Raj Singh wrote:

> Hi group. I want to create a new line tool that is different in 2 ways:
> 1. the line is created with a paintbrush-type motion--i.e. a MouseDrag
> 2. this is a multi-user scenario, so graphics must be tagged with a
> user-id.
>
> I've searched through the archives, read the '7.10. How do I
> programmatically use the Drawing Tool?" FAQ, and searched through the
> code. It looks like there's a lot of integration between many
> components to implement drawing functionality, and I'm worried
> (actually I'm sure) I don't have a full understanding of the flow of
> control.
>
> So...my question is, can anyone walk me through this a little better?
> This would probably be a good FAQ: "How do I extend a drawing tool?"
>
> thanks,
> Raj
>
> --
> [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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Feb 22 2005 - 17:26:20 EST

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