[OpenMap Users] Overriding EditableOMGraphic/OMDrawingTool deactivate() behaviour

From: Thomas Schar <thomas.schar_at_dsto.defence.gov.au>
Date: Tue, 29 Aug 2006 16:00:45 +0930

Hi All,

We have written a number of graphic components extending from the
OMPoly/Line/etc classes and they work fine for most things.
However, we have found that requiring a user to double click to end the
drawing mode is problematic, especially when what they are drawing is
not 'free form' (ie. a fixed discrete number of pts).

The problem is that OMDrawingTool.deactivate() is appending an extra
latlon point when called (ie. it adds an additional point when invoked
using the current cusor position). Hence, by providing a 'stop drawing'
type button that invokes deactivate() the user still adds an additional
point when drawing.

I've been reading through the OMDrawingTool / EditableOMGraphic source
and can't seem to locate exactly where this extra point is coming from
to override. Does anyone have any suggestions?

(Just to recap in case I've been vague.
UseCase: User selects object to draw from tool palette - it requires 4
pts. user clicks the 4 pts, and then wants to be able to press a
'finished' button. That button invokes deactivate(). Problem is that
the mouse listener is still running and so the mouseDown() still fires
and a 5th point is added before the object is drawn. In the case
causing an error).

Many thanks.
Tom.



--
[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 Aug 29 2006 - 03:53:38 EDT

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