[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