Re: [OpenMap Users] Selecting and Editing Graphic from Swing Control.

From: William Brightwell <wbrightwell_at_mtcsc.com>
Date: Wed, 01 Oct 2008 10:43:44 -0400

Hey Don,

Thanks for the follow up on this.

The type of layer is an EditorLayer. So, to the best of my knowledge I do
have an OMDrawingTool that is configured to edit the graphic via the
EditorTool for the layer. In fact, I AM able to make the graphic editable
via this "controller" but it just requires an extra step from the user that
I find to be unnecessary. This step is that the user would have to click
back on the map before the graphic is "displayed" as editable (showing grab
points). Also, the important thing to understand is that it doesn't matter
where I click on the map. So after selecting to edit my graphic via my
Jtree, if the graphic is in the bottom right, I can click in the top left,
bottom left, top right, middle, anywhere on the map, and it will display the
desired graphic as editable.

In summary, I want to display a graphic as being editable by selecting it in
a component of my application that is external of OpenMap.

Thanks,
Adam

On 10/1/08 9:03 AM, "Don Dietrick" <dietrick_at_bbn.com> wrote:

> Hi Adam,
>
> What does layer.edit() do? I mean, do you have an OMDrawingTool
> configured to edit the OMGraphic? What kind of layer is the
> controller calling edit() on?
>
> - Don
>
> On Sep 25, 2008, at 2:03 PM, William Brightwell wrote:
>
>> Thanks for the responses.
>>
>> I have tried both of these approaches. Neither have any affect.
>>
>> Allow me to clarify my issue. I have a "map controller" that will
>> translate
>> all of my users actions via my application into some kind of action
>> on the
>> map. So, I have a method MapController.selectGraphic(...) which is
>> where I
>> am calling layer.edit(graphic). My MapController class is nothing
>> more than
>> an abstraction layer to allow me to keep my application minimally
>> dependent
>> on OpenMap. This is done for architectural purposes. It has access
>> to the
>> MapPanel and the MapHandler as well as everything they provide
>> (obviously).
>> So, using this approach, my Jtree has no knowledge of OpenMap, all
>> it is
>> aware of is that a node has been selected and a "delegate" for the
>> tree
>> calls MapHandler.selectGraphic(...) which as stated above calls
>> layer.edit(graphic). The call to "edit" is doing its job, because
>> when I
>> click back on the map (doesn't matter where) the desired graphic I
>> wanted to
>> edit becomes editable. And what I mean by editable is that it then
>> shows
>> its grab points, etc. But not until I click back on the map. It
>> would seem
>> like it might be related to "focus" but that doesn't seem like it
>> makes much
>> sense to me. I am trying to achieve the same effect as clicking on
>> the
>> graphic on the map using the SelectMouseMode just through a
>> different UI.
>>
>> Hopefully this sheds a bit more light on the issue.
>>
>> Thanks again for you suggestions,
>> -Adam
>>
>>
>> On 9/25/08 10:09 AM, "Carsten Ø. Madsen" <com_at_navicon.dk> wrote:
>>
>>> Hi
>>>
>>> Try doing a doPrepare, repaint... whatever on the layer after calling
>>> layer.edit.
>>>
>>> BR
>>> Carsten
>>>
>>> Adam Brightwell wrote:
>>>> Hello,
>>>>
>>>> I am trying to select a graphic for editing via a Swing control.
>>>> Essentially what I have is a simple JTree that has a list of all the
>>>> graphics on a given layer. When I "double-click" the tree node that
>>>> represents a graphic, I want to select that graphic for editing. I
>>>> have got all the logic and listeners figured out and working, it is
>>>> now just the ability to properly select the graphic for editing, in
>>>> particular an OMPoly.
>>>>
>>>> Here is what I am currently experiencing. When I call
>>>> layer.edit(graphic) nothing happens to the graphic, grab points are
>>>> not displayed, etc. However, when I click on the map, they
>>>> magically
>>>> appear on the graphic I selected to edit.
>>>>
>>>> Any suggestions?
>>>>
>>>> Thanks,
>>>> Adam
>>>>
>>>> --
>>>> [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"]
>>
>>
>> Important Notice: This email message and any attachments may contain
>> information and/or trade secrets that are private, and are meant to
>> be delivered solely for the use of the intended recipient(s). If you
>> are not the intended recipient, please do not read, copy, use,
>> forward or disclose the contents of this communication to others.
>> Interception of e-mail is a crime under the Electronic
>> Communications Privacy Act, 18 U.S.C. 2510-2522 and 2701-2709. If
>> you have received this email in error, please immediately notify us
>> by return email or by telephone at [703-221-0200 Ext 51119] and
>> promptly delete this message. Thank You.
>>
>>
>> --
>> [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"]

--
[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 Wed Oct 01 2008 - 10:45:53 EDT

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