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

From: William Brightwell <wbrightwell_at_mtcsc.com>
Date: Thu, 25 Sep 2008 14:03:58 -0400

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"]
Received on Thu Sep 25 2008 - 14:27:24 EDT

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