Hi all,
I have changed to the new domain: http://acuriousanimal.orggeo.net. I hope to have some time to move some post to the new site.
The Balloon project blog is a place to talk about my personal virtual globe project so called "Balloon Project". Initially it was born using my own developed 3D API allowing to load, render and animate GIS information, georeference images, import lat/lon shapefiles and load layers from any WMS server. The future project will be based (I hope it) in WWJ. WWJ is still in an early alpha stage, because it, I try to contribute with some features I learn or implement working in my own 3D API.
Thursday, April 09, 2009
Saturday, January 24, 2009
SwingAnnotations on WWJ
Thanks to Arnaud Saval, who helps me with the problems commented in my previous post, here is the new version of AnnotationWindow which I called more rightly SwingAnnotation.
There are two important requirements you need to know before start using SwingAnnotation:
The JPanel of the SwingAnnotations share the same container as the WWJ canvas. This is the reason you need to set the layout to null, to allow place the panels at any location.


You can get the source code here.
There are two important requirements you need to know before start using SwingAnnotation:
- You need JDK6u12 (which currently is in early access). JDK6u12 solves the problem between heavyweight and lighweight component, this way we can put JPanel on top of a Canvas component without problems.
- The container on which the WWJ Canvas resides must use a null layout:
...
wwd = new WorldWindowGLCanvas();
wwd.setSize(new java.awt.Dimension(600, 500));
this.getContentPane().setLayout(null);
this.getContentPane().add(wwd);
...
The JPanel of the SwingAnnotations share the same container as the WWJ canvas. This is the reason you need to set the layout to null, to allow place the panels at any location.


You can get the source code here.