[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20060112: IDV question





I have been looking at the IDV source code and developer's guide to try and 
figure out how to best integrate IDV into the Domain (map) tool that Paula and 
I are writing. As you know better than me, there are quite a few packages and 
class files in IDV! I'm a bit lost.

Is there a place in the developer's guide you could direct me to? What I want to do is imbed a map display (panel?) and the display manager (panel?) into our current Swing project. For example, I looked at ucar.unidata.view.geoloc.NavigatedPanel.
I've attached a jpeg mock up screen shot of what I envision our domain (map) 
tool program would look like with a simple IDV map display imbedded inside it. 
Hopefully that picture will give you an idea of what we want to accomplish.

The NavigatedPanel is what we use for showing simple maps and is not the main idv class.

First of all a caveat - Most of the work and documentation we have done is targeted towards end users and non-code configuration of the IDV. An important thing to remember is that the IDV is more of an application framework than a component library. It will probably be difficult to pull out specific pieces from it. However, we really have tried to make the IDV fully extensible via code as well, it just might be a little creaky around the edges but we
are more than willing to work with you guys to make it better.

A good place to start is the package:
ucar/unidata/apps/example
This is a little out of date but does indeed work and can serve as a starting point. The current version of that code in the source release has some old code from our work with a guy in the Navy. I have cleaned it up and am attaching a jar file of the source.
Remove the ucar/unidata/apps/example directory in your source release
and unjar the new directory.



The IDV is normally configured through a set of xml resource files. You can define menu bars, the user interface, what data source types are available, displays, color tables,
the data source choosers, etc.

However, you will want to have much more control over the UI and behavior of your application. To do this you will probably create a DomainToolIdv class (like the ExampleIdv.java). This can override the factory methods that create the different managers tht the idv uses to do things
with. For example, the method in IdvBase:

   protected IdvUIManager doMakeIdvUIManager() {...}
__
Normally creates an IdvUIManager object.  You can override that method
to create a DomainToolUIManager object. This class can then in turn override
the base class method that creates the user interface:

   public IdvWindow createNewWindow(List viewManagers,
                                    boolean notifyCollab) {...}


There is probably lots more you'll need to know about the code that we don't
have documented. But we do have documentation about configuration:

The workshop materials have a section on basic configuration:
http://www.unidata.ucar.edu/software/idv/docs/workshop/page_configuringidvsites.html

The user guide has some configuration info also:
http://www.unidata.ucar.edu/software/idv/docs/userguide/SiteConfiguration.html

And of course the (work in progress) developer's guide:
http://www.unidata.ucar.edu/software/idv/docs/developer/index.html

Jeff

Attachment: example.jar
Description: Binary data