Re: [OpenMap Users] Extend statusbar information (info delegator) when drawing polygons?

From: Brightwell, William <wbrightwell_at_mtcsc.com>
Date: Thu, 13 Jan 2011 13:54:26 +0000

Carsten,

I've recently made such changes to the InformationDelegator.

This delegator has two default information line holders. One is the
coordinate information line and the other is a default "map object"
information line.

I found that I needed three information lines to display secondary
information like you are describing. But I also needed to keep information
in the "coordinate" and "map object" information lines.

So, I overrode the "initWidgets" method in the InformationDelegator class as
I could not figure out how to add such a component otherwise.

In the initwidgets, I simply rebuilt the panel using the default information
line holders. Then I added my own. You have to add it to the panel
(obviously) and then all so to the array list of line holders using the
addInfoLine() method. I also created a constant to reference the "index" of
the new line holder. Then I fired an "InfoDisplayEvent" from my mouse mode
when appropriate. Like this...

InfoDisplayEvent event = new InfoDisplayEvent(this,
infoline,
MyInformationDelegator.MY_INFO_LINE);

infoDelegator.requestInfoLine(event);

I hope this helps.

-Adam

-- 
W. Adam Brightwell
Software Engineer, MTCSC
Certified Scrum Master
Email:  wbrightwell_at_mtcsc.com
Office: 843-856-1935/1985 x51632
Cell:   843-810-8701
> From: "Carsten Ø. Madsen" <com_at_navicon.dk>
> Organization: NAVICON A/S
> Date: Thu, 13 Jan 2011 13:59:57 +0100
> To: <openmap-users_at_bbn.com>
> Subject: [OpenMap Users] Extend statusbar information (info delegator) when
> drawing polygons?
> 
> Hello
> 
> I would like to extend the status bar information to behave like the
> distance tool when polygons are drawn/created so that the distance
> between the current location of the mouse and the last node added to the
> polygon (if any) is printed in the statusbar.
> 
> I guess I have to do something with EditorLayerMouseMode but I have no
> clue on how to proceed. Any hints will be appreciated.
> 
> BR
> Carsten
> 
> --
> [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 Thu Jan 13 2011 - 09:07:36 EST

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