Re: [OpenMap Users] Tool panel & layer visibility interactions

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 22 Sep 2004 17:11:34 -0400

Hi Peter,

On Sep 22, 2004, at 4:57 PM, Peter Solderitsch wrote:

>
> All,
>
> This has probably been answered before, but as per my last message, I'm
> currently unable to search the mailing list archives.

First, thanks for the heads-up, we're looking into it.

> When enabling/disabling the Drawing layer in the standard OpenMap gui,
> drawing-related tool buttons are added/removed dynamically based on
> that
> layer's visibility. My question is: how does one go about adding
> similar
> behaviors to a custom-written layer subclass?
>
> I've been looking through the source and haven't been able to figure
> out
> how this works. I know how to add a Tool unconditionally to the
> ToolPanel, I just haven't figured out the preferred mechanism (if there
> is one) of associating that tool (or a collection of tools) with a
> particular layer's visibility.

Any component that implements the com.bbn.openmap.gui.Tool interface
will be picked up by the ToolPanel (unless the ToolPanel has properties
defined that limit which Tools it shows). Tools provide a Container to
the ToolPanel, and a layer can control the visibility of it when it's
added to the map (based on it's own visibility).

That said, the com.bbn.openmap.layer.editor package contains a
framework that can make this easy to create layers that provide
specific drawing capabilities to the application. You can provide the
EditorLayer with an EditorTool to display (you can define this in the
properties). The DrawingEditorTool is responsible for the drawing
layers you mention.


Hope this helps,

Don


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Wed Sep 22 2004 - 17:12:02 EDT

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