Hi Tobias, <br><br>Maybe off-topic, but you may have license conflicts between EPL and GNU/GPL. <br><br>Cheers. <br><br><div class="gmail_quote">2011/4/7 Juan Lucas Domínguez Rubio <span dir="ltr">&lt;<a href="mailto:juan_lucas_dr@yahoo.com">juan_lucas_dr@yahoo.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">
Hello, Tobias:<br><br>I don&#39;t have much experience in &#39;improper&#39; 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.<br>
<br>As you perhaps know, the application gvSIG Mobile is using a simplified version of gvSIG 1.X mapping libraries.<br><br>I wrote a little &#39;unofficial&#39; version of gvSIG Mobile for Linux devices (such as the Openmoko phone or the Nokia N810 tablet) with less functionalities than the &#39;official&#39; gvSIG Mobile but including some other new features.<br>
<br>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:<br><br>- 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:<br>
<br>public void draw(Graphics g, ViewPort vp) throws FMapDriverException { ... }<br><br>you will have:<br><br>public void draw(IGraphics g, ViewPort vp) throws FMapDriverException { ... }<br>(IGraphics is a new Java interface)<br>
<br>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.<br><br>- create a new Java project with those Java interfaces (the new libFMap will depend on this project)<br>
<br>- 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.)<br><br>- 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.<br>
<br>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:<br>
<br><a href="https://svn.prodevelop.es/public/labs/gvsigmobileonopenmoko/trunk/" target="_blank">https://svn.prodevelop.es/public/labs/gvsigmobileonopenmoko/trunk/</a><br><br>and these are a couple screenshots of the aplication:<br>
<br><a href="http://gvsigmobileonopenmoko.files.wordpress.com/2009/04/carta_2007.jpg" target="_blank">http://gvsigmobileonopenmoko.files.wordpress.com/2009/04/carta_2007.jpg</a><br>(WMS layer + 2 little
 shapefiles)<br><br><a href="http://gvsigmobileonopenmoko.files.wordpress.com/2009/07/nokia_31468.jpg" target="_blank">http://gvsigmobileonopenmoko.files.wordpress.com/2009/07/nokia_31468.jpg</a><br>(ArcIMS layer)<br><br>
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:<br><br>org.eclipse.swt.graphics.GC<br>org.eclipse.swt.graphics.Image<br>
<br>So that would be one way to properly integrate gvSIG in the Eclipse RCP platform.<br><br>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&#39;s graphic hardware capabilities and therefore drawing is faster and more flexible.<br>
<br><br>Regards,<br><br>Juan Lucas Domínguez Rubio<br><a rel="nofollow" href="http://gvsigmobileonopenmoko.wordpress.com" target="_blank">http://gvsigmobileonopenmoko.wordpress.com</a><br><a rel="nofollow" href="http://gvsigmobileonopenmoko.wordpress.com/" target="_blank">http://</a><a rel="nofollow" href="http://tellusproject.blogspot.com" target="_blank">foss4gis.blogspot.com</a><br>
<br>--- On <b>Wed, 4/6/11, Neumann, Tobias <i>&lt;<a href="mailto:tobias.neumann@berner-mattner.com" target="_blank">tobias.neumann@berner-mattner.com</a>&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<br>From: Neumann, Tobias &lt;<a href="mailto:tobias.neumann@berner-mattner.com" target="_blank">tobias.neumann@berner-mattner.com</a>&gt;<br>Subject: [Gvsig_english] Eclipse RCP with gvSIG<br>To: <a href="mailto:gvsig_internacional@listserv.gva.es" target="_blank">gvsig_internacional@listserv.gva.es</a><br>
Date: Wednesday, April 6, 2011, 7:35 AM<div><div></div><div class="h5"><br><br><div>


 
 

<p><font size="2">Hello,<br>
<br>
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?<br>
<br>
Thank you very much!<br>
<br>
Best regards,<br>
Tobias<br>
<br>
<br>
<br>
Tobias Neumann, M.Sc. in Geogr.<br>
Softwareingenieur<br>
<br>
Tel: +49 89 608090-276<br>
Fax: +49 89 6098182<br>
E-Mail: <a href="mailto:Tobias.Neumann@berner-mattner.com" target="_blank">Tobias.Neumann@berner-mattner.com</a><br>
Web: <a href="http://www.berner-mattner.com" target="_blank">www.berner-mattner.com</a><br>
<br>
Berner &amp; Mattner Systemtechnik GmbH<br>
Erwin-von-Kreibig-Str. 3<br>
D-80807 München<br>
<br>
Geschäftsführer: Hans Berner, Dr. Klaus Eder, Dr. Jan-Oliver Wenzel<br>
Registernummer: HR B 83252 beim Amtsgericht München<br>
Sitz der Gesellschaft: München<br>
<br>
<br>
<br>
</font>
</p>

 
</div><br></div></div>-----Inline Attachment Follows-----<br><br><div>_______________________________________________<br>Gvsig_internacional mailing list<br><a href="http://mc/compose?to=Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br></div></blockquote></td></tr></tbody></table><br>_______________________________________________<br>

Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jordi Torres Fabra<br><br>gvSIG 3D blog<br><a href="http://gvsig3d.blogspot.com">http://gvsig3d.blogspot.com</a><br>Instituto de Automática e Informática Industrial <br>
<a href="http://www.ai2.upv.es">http://www.ai2.upv.es</a><br>