[Gvsig_english] Re: workflow gvgis, open a wms document.

daniel.izquierdo at sinfogeo.com daniel.izquierdo at sinfogeo.com
Fri Apr 28 09:46:43 CEST 2006


I answer myself :).


>Subject: [Gvsig_english] workflow gvgis, open a wms document.
>Hi,
>I am a new gvgis developer. I hope to be useful when you had doubts about
>gvgis in the future, but at the moment I have doubts :).
>I don't understand the internal workflow. For example, I want to open a
>new window where I would like to show a wms view. I understand how a
>normal user can do that, I did that, but I don't understand how I can do
>that developing.
>I know we have plugins, and I understand the internal architecture, but I
>don't understand very well the work flow in the code.

I have had an answer from the spanish maillist:
If you want to create a view, you need to use the file
"com.iver.cit.gvsig.project.ProjectWindow, line 397"

 com.iver.cit.gvsig.gui.View vista = new
 com.iver.cit.gvsig.gui.View();
             int index = lstDocs.getSelectedIndex();

             if (index == -1) {
                 return;
             }

             vista.setModel((ProjectView) p.getViews().get(index));
             PluginServices.getMDIManager().addView(vista);

The most important line is vista.setModel((ProjectView)...

And of course, you need a ProjectView. How can you create a new
ProjectView, for example you can use the static method
ProjectView.createView(String name). After that, you will be allowed to
change mapContext attribute, and you will be allowed to add views to the
project.

Thanks!.



More information about the Gvsig_internacional mailing list