[Gvsig_english] Eclipse RCP with gvSIG

Neumann, Tobias tobias.neumann at berner-mattner.com
Thu Apr 7 12:53:49 CEST 2011


Hola César y Juan! :-)

Thanks a lot for your thoughts and experiences. I believe the combination of gvSIG and RCP will matter a couple of hours of work for me :o)
I am just starting up with gvSIG and will investigate what will be necessary to satisfy our needs. Unfortunately we do not have the choice to match our requirements without Eclipse RCP. I will tell you about my improvements.

With best regards
Tobias



-----Ursprüngliche Nachricht-----
Von: gvsig_internacional-bounces at listserv.gva.es im Auftrag von Juan Lucas Domínguez Rubio
Gesendet: Do 07.04.2011 12:01
An: Users and Developers mailing list
Betreff: Re: [Gvsig_english] Eclipse RCP with gvSIG
 
Hello, Tobias:

I don't have much experience in 'improper' integration between gvSIG and Eclipse SWT (I mean, things like embedding AWT controls in a SWT context or using some kind of library wrapping), but I have done some tests regarding gvSIG libraries in a SWT context.

As you perhaps know, the application gvSIG Mobile is using a simplified version of gvSIG 1.X mapping libraries.

I wrote a little 'unofficial' version of gvSIG Mobile for Linux devices (such as the Openmoko phone or the Nokia N810 tablet) with less functionalities than the 'official' gvSIG Mobile but including some other new features.

At that time, I found no JVM for those devices that could use the AWT classes (used by gvSIG and gvSIG Mobile). Instead, the Eclipse SWT library was working fine on them, so I changed the gvSIG mapping libraries to make them graphic context independent, and then reimplemented the needed classes to use Eclipse SWT classes. Essentially, I did this:

- Take the mapping library of gvSIG 1.X (libFMap) and replace all the occurrences of the classes Graphics2D and Image (this includes all the BufferedImage), with some Java interfaces created by you. So, for ecample in the FLyrVect class, instead of:

public void draw(Graphics g, ViewPort vp) throws FMapDriverException { ... }

you will have:

public void draw(IGraphics g, ViewPort vp) throws FMapDriverException { ... }
(IGraphics is a new Java interface)

Before doing this, I removed a lot of drivers from libFMap which were not interesting. I also applied this transformation to the WMS driver and added it to my workspace.

- create a new Java project with those Java interfaces (the new libFMap will depend on this project)

- create another Java project containing an implementation of those Java interfaces. Here is where you would use the SWT library to implement all the needed methods (such as drawing a line, creating an image, pasting an image on a graphic context, etc.)

- then, at the beginning of the application, you create a SWT-based factory that is able to instantiate all those SWT-based graphic resources and methods, and use it across the application.

There are a lot of other important things I had to do from scratch, for example the table of contents (TOC) and of course all the GUI (dialogs). I also split the libFMap project in different parts (libGeom, libRender, etc). This was the resulting workspace:

https://svn.prodevelop.es/public/labs/gvsigmobileonopenmoko/trunk/

and these are a couple screenshots of the aplication:

http://gvsigmobileonopenmoko.files.wordpress.com/2009/04/carta_2007.jpg
(WMS layer + 2 little shapefiles)

http://gvsigmobileonopenmoko.files.wordpress.com/2009/07/nokia_31468.jpg
(ArcIMS layer)

I have never done it myself, but I presume in the Eclipse RCP-based applications you eventually will have to use the SWT graphic classes I used, especially:

org.eclipse.swt.graphics.GC
org.eclipse.swt.graphics.Image

So that would be one way to properly integrate gvSIG in the Eclipse RCP platform.

After my little experience, I think that the Eclipse SWT graphic context is less powerful and slower than the AWT Graphics2D class. I did not investigate it deeply but I think AWT has better access to the device's graphic hardware capabilities and therefore drawing is faster and more flexible.


Regards,

Juan Lucas Domínguez Rubio
http://gvsigmobileonopenmoko.wordpress.com
http://foss4gis.blogspot.com

--- On Wed, 4/6/11, Neumann, Tobias <tobias.neumann at berner-mattner.com> wrote:

From: Neumann, Tobias <tobias.neumann at berner-mattner.com>
Subject: [Gvsig_english] Eclipse RCP with gvSIG
To: gvsig_internacional at listserv.gva.es
Date: Wednesday, April 6, 2011, 7:35 AM




 
 
Eclipse RCP with gvSIG
Hello,



I am interested in your experiences with the gvSIG software embedded in Eclipse RCP. I want to start up a project using these technologies. Anyone did this before? Are there some points I have to focus on?



Thank you very much!



Best regards,

Tobias







Tobias Neumann, M.Sc. in Geogr.

Softwareingenieur



Tel: +49 89 608090-276

Fax: +49 89 6098182

E-Mail: Tobias.Neumann at berner-mattner.com

Web: www.berner-mattner.com



Berner & Mattner Systemtechnik GmbH

Erwin-von-Kreibig-Str. 3

D-80807 München



Geschäftsführer: Hans Berner, Dr. Klaus Eder, Dr. Jan-Oliver Wenzel

Registernummer: HR B 83252 beim Amtsgericht München

Sitz der Gesellschaft: München










 

-----Inline Attachment Follows-----

_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at listserv.gva.es
http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5531 bytes
Desc: not available
Url : http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20110407/4862c83a/attachment.bin 


More information about the Gvsig_internacional mailing list