Re: Interactivly adding layers in openmap application.

From: Donald Dietrick <dietrick@bbn.com>
Date: Wed Oct 17 2001 - 18:59:47 EDT

Hi Kai and Bernhard,

I just wanted to drop a note to thank you very much for the patch. The
functionality it provides is great, and I've incorporated it into the
next release, albeit with a few changes, and I wanted to write to you
(and the list) to let you know what those changes were, and get some
comments on the changes.

This might be confusing to those on the list that haven't checked out
the package.

I kept the LayerAddPanel the way it was, with the popup menu, text field
and button. I did change the meaning of the text field so that it sets
the name of the layer as it would be used in the application, i.e. the
pretty name of the layer. I figured the prefix, as hidden as it is,
really isn't something that the user needs to know about, and I create a
prefix name off of the pretty name, changing it to lower case and
exchanging any spaces with '_' characters.

I moved the propertyeditor package from under the layers directory to
com.bbn.openmap.util.propertyEditor, and moved the Inspector there,
since the property editors can be used with any PropertyConsumer, and
not just layers. I've added several PropertyEditors, too:

- MultiDirectoryPropertyEditor.java - lets you append directories/files
to each other, ';' separated, using a file chooser.
- ColorPropertyEditor.java - brings up a OMColorChooser to set the color
for a property
- OnOffPropertyEditor.java - brings up on/off radio buttons to set
true/false property
- DirectoryPropertyEditor.java - brings up file chooser to choose one
directory. Path of directory on button.
- TextPropertyEditor.java - what was submitted, text field editor
- FDUPropertyEditor.java - text field, with button for file chooser, to
replace contents of text field. File chooser lets you choose a file or
directory
- TrueFalsePropertyEditor.java - brings up true/false radio buttons to
set true/false property
- FUPropertyEditor.java - text field, with button for file chooser, to
replace contents of text field. File chooser lets you choose a file only
- FilePropertyEditor.java - brings up file chooser, to choose one file.
Path of file on button.
- YesNoPropertyEditor.java - brings up yes/no radio buttons to set
true/false property
- NonEditablePropertyEditor - for properties that can't/shouldn't be
edited, like class names, etc.

If a property for a PropertyConsumer needs a specific editor, I think it
should go in the PropertyConsumer's package - i.e., the
VPFDatabasePropertyEditor will be moved to the vpf layer package.

One more editor that I can think of is one that provides a limited list
of options. I have a feeling that an abstract version can reside in the
propertyEditor package, but specific instances need to reside in the
PropertyCosumer's package.

There were changes to the Inspector. The initProperties property was
moved from Layer to PropertyConsumer, since it isn't limited to the
layer. Its meaning was also changed within the Inspector, too - it now
limits what properties are to be editable, or for the order they should
be listed. If it is not defined, then all the properties are listed in
the Inspector, and they are listed in alphabetical order. Also, if a
property needs a specific editor to be used, the propertyname.editor
property should be set (to the PropertyEditor classname) in the
properties object returned from the getPropertiesInfo() method. I think
this used to be set in the getProperties() method before, but I moved
it, since it's a metadata thing.

I modified the LayerAddPanel property called "addableLayers", that works
like your property (I forget what it was called). It works the same way
as yours did, defining a list of marker names, with markerName.class and
markerName.prettyName needing to be defined for the GUI. PlugIns can
also be added to this list, now, and if one is created, then a
PlugInLayer is automatically created and wrapped around the PlugIn. As
a side note, this is now true for the LayerHandler, which uses the
openmap.layers property list to create layers - PlugIns will be able to
be used directly in this list, too.

The GraticuleLayer has been modified have a button on its palette that
brings up the Inspector to change its current settings. This is a
pretty cool use for the Inspector, and is probably something that will
be added to all layers in the future.

Speaking of the future, I haven't been able to update all of the layers
and plugins to be fully compliant PropertyConsumers, using the interface
to adjust all of their settings. I'll have a list of the layers/plugins
that have been updated, and those that need work.

To the openmap-users list: I'd appreciate any help I can get in
finishing them off after the release. This will not only help get all
the layers runtime-addable, but will also help in another new feature.
The next release also has a couple of FileMenu options that let you load
a properties file at runtime, kind of loading a different map. There is
also an option to save the current settings of the map to a properties
file. This could get troublesome for the layers that don't know how to
respond to the PropertyConsumer methods properly. Also, with writing
the map file, the openmap.components property is written out identically
as it was read in from the startup openmap.properties file (the
application doesn't change). There needs to be a widget to figure out
how to write the components out in the proper order, since order does
matter here for the appearance of the application. The objects out of
the BeanContext are quite random, so if you try to create a new
openmap.components list based on what's in the BeanContext, you get a
funky application defined in the new properties file.

That's about it. I'm trying to wrap up a couple of loose ends with the
next release, but look for it in the middle of next week.

Thanks again, Kai and Bernhard!

Regards,

Don

On Tuesday, August 28, 2001, at 07:24 PM, Bernhard Reiter wrote:

> This is the annoucement of Kai Lessmanns work to
> make it easier to browse data with the OpenMap Application.
>
> The patch be downloaded from:
> ftp://intevation.de/users/bernhard/openmap/
>
> Haven't checked if it still can be applied to openmap 4.3
> without warnings. It took us a bit to get it published.
>
> Bernhard
> ps.: Send be a carbon-copy of relevant replies as I am not on the
> openmap-users list most of the time.
>
> From the Readme:
>
> This patch enhances the OpenMap Application (4.1.1). It adds a menu
> item to
> add new layers to the map at runtime interactively. A framework to add
> any
> layer type is provided, ShapeLayers in particular are supported.
>
> The main work is done in two classes: LayerAddPanel and Inspector,
> both found
> in the com.bbn.openmap.gui package. LayerAddPanel adds a menu item to
> the
> Layers menu, which triggers a panel for interactively instantiating a
> Layer
> object. Inspector queries a new Layer object (actually any
> PropertyConsumer)
> through the PropertyConsumer interface to configure it.
>
> For details see the javadoc class documentation (might have to be
> rebuilt (make
> docs)).
>
>
> --
> Professional Service around Free Software
> (intevation.net)
> The FreeGIS Project
> (freegis.org)
> Association for a Free Informational Infrastructure
> (ffii.org)
> FSF Europe
> (fsfeurope.org)
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Oct 17 19:01:25 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT