The examples I gave will work for both 1.0.x and 1.1 streams. The api's
are virtually identical there is just more flexibility in 1.1. If you
wish to get started you can develop the example where you drop a string
on a layer against 1.0.5 and it will be fully compatible with 1.1 as well.
Jesse
M.S.Bachler wrote:
I definitely think I will need to wait for 1.1 before I do any real
programming as I require drag and drop from uDig to Compendium and I
understand from the documentation that this is only possible with 1.1.
Thanks for the D&D comments. Looks like I will need to do both types
eventually.
But I can start with string to ease myself into it. :-)
Michelle
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jesse
Eichar
Sent: 01 November 2005 01:52
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] Drag and Drop and beyond.
[snip]
I am trying to understand how to start approaching the D&D stuff I need
to do. If I drop a string or image file onto a Map, I assume it would
need to create a new layer in the layer manager (and assuming I have
programmed where), ultimately store the data in the database and then
render the feature.
Are you going to be developing on uDig 1.1 or 1.0.x? I have done a lot
of the difficult work so there is a nice framework for 1.1 but the
downside is that it not being released until later this month. I don't
know what your timeline is like.
You can look at
net.refractions.udig.project.ui.internal.actions.DropAction for an
example of an action taken when a url is dropped on a a layer. The
declaration of the drop action in the project.xml goes something like:
<action
class="net.refractions.udig.project.ui.internal.actions.SLDDropAction"
name="SLD Drag and Drop">
<destination class="net.refractions.udig.project.ILayer"/>
<acceptedType class="java.io.File"/>
<acceptedType class="java.net.URL"/>
<acceptedType class="java.lang.String"/>
</action>
I'm going to put this example in the drag and drop documenation I wrote
for you.
So I need to deal with Map, LayerManager, RenderManager, Catalogue,
Feature and probably more? Ahhh! I feel sleepless nights coming on.
This depends on the work flow and requirements. Suppose you drop a
string on layer in LayersView and the drop action creates a feature by
interpreting the string and adds it to the layer. In this case can use
the Layer.getResource() method to get a FeatureStore (Class used for
adding/removing features from a datastore) and add the feature using the
FeatureStore. In this case all you need to know is the Layer and
FeatureStore API.
Now suppose you drop a image that some how specifies a layer and all the
features in the layer. In this case you need to know Map, Layer,
Catalog, Feature, DataStore, etc...
Hope this helps.
Jesse
_______________________________________________
User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel