Probably you could think PSP is not the best device to read PDF files and also it is not intended to do so, better to play some game like Need For Speed :) Yes, I know but I'm "a curious animal" and use my PSP more read than other thing.

Some time ago I update my PSP, now runs 5.50 GEN-D firmware version, and since then Bookr doens't works, the nasty 8002014C error appears on my screen.

Well, don't ask my why but if you want to use bookr too the version that works for me is Bookr for firmware 1.0.

See bookr in action:

If you, like me, loves Drupal then this post is for you.

Not much so say here, simply another site pointing to MyDrupal post that collects a bunch of nice tutorials classified depending on the user level skill (beginner, intermediate, developer):

http://mydrupal.com/drupal-tutorials

Recently I was working on a AS3 project and surprisingly the handler assigned on a Sprite subclass for mouse DOUBLE_CLICK events never is fired.

If you arrive here and are in the same situation like me, then the next link is for you: http://actionscript3.blogs2k.com/2009/01/17/ActionScript%203%20-%20no-double-click-at-all%20-AS3.

If you go to first comment you could read that:

In order for the DOUBLE_CLICK event to be captured, the MovieClip, or Sprite in this case, you must first have the doubleClickEnabled property set to true.

Take also into account probably you must play too with the 'mouseChildren' property and that could be a problem when you work with some kind of scene graph objects.

Finally I would like to note one of the solutions commented to emulate the double click using simple the click event and getTimer().

const CLICK_TIME:int = 300; var doubleTimer:int; addEventListener(MouseEvent.CLICK, handleMouseClick); function handleMouseClick(e:MouseEvent):void { if (e.type == MouseEvent.CLICK) { if (getTimer() - doubleTimer < CLICK_TIME) { // execute code or dispatch event here } doubleTimer = getTimer(); } }

This post is a mini tutorial on how to create an application based on NetBeans Platform that uses the WorldWind Java virtual globe.

Before to continue, you need to have some knowledge about NetBeans Platform, WWJ and JOGL.

About NetBeans Platform

NetBeans Platform, similar to Eclipse RCP, is a platform which offers a set of basic functions and functionallities that are common in almost all project. The most clear examples of applications developed with these platforms are NetBeans IDE and Eclipse IDE themselves.

In the case of NetBeans Platform some features that likes me are:

  • 100% Swing.
  • Modular runtime container.
  • Plugin support.
  • Window system.
  • Support handling actions, files and many other things typical in applications.
  • Active project, decent documentation and great forum activity.

About WorldWind Java

WordlWind Java is a Java API to create and work with a virtual globe, something common on these days and not so easy to implement.

In contrast to WorldWind .NET which is a desktop application, WWJ is only an API, a set of classes you can use to create your own based application.

One impotant thing is WWJ works thanks to JOGL (Java binding for OpenGL API), which is a Java API to work with OpenGL and that uses a native library implementation depending on your system.

...and what is the problem

Nice question. Ok, if we can say there is any problem it will be: how to create a NetBeans module which includes the JOGL JAR files and also the native libraries so my application will be portable?

Follow the next steps and you will see there is not problem to achieve that.

Environment and requisites

Here is the list of software and versions I'm using for this example:

  • NetBeans IDE 6.7.
  • WorldWind Java 0.6 (build 263.12713).
  • JOGL (version 1.1.1a). I downloaded versions for Linux and Windows to test the application on two platforms.

Install NetBeans if you don't have installed. Download WWJ and JOGL and uncompress it at some place.

 

How to create the application

Ok next is the important part of this article. The basic idea is to create a new NetBeans Platform application with two library modules, containing required JAR files for JOGL and WorldWindJava:

  1. Step 1: Create a NetBeans Platform Application:
  2. Step 2: Create a library wrapper module for WWJ:

    Select the worlwind.jar file from WWJ folder. This will create a module into your NB platform application with the next folder structure:

  3. Step 3: Create a library wrapper module JOGL:

    Select the jogl.jar and gluegen.jar files from JOGL folder. In addition to the previous step, here we need to include the native libraries JOGL needs to run. To do that you must to create a folder called release/modules/lib and copy the native libraries.

    In the above image you can se the *.so files which corresponds only to the Linux native libraries. To make your application portable to other systems you must need to copy here the required *.dll or any other files.

  4. Step 4: Create a normal module.

    This module will contain the code to create a TopComponent window which will show the WWJ virtual globe:

  5. Step 5: Set modules dependencies.

    What you need to do now is to set the dependecies among the modules. WWJ module depends on JOGL one and your previous normal module will depend on WWJ and JOGL, because it will show a window with the virtual globe.

  6. Step 6: In the previous module create a new TopComponent Window using the wizard:

    Right-click on the module name and select New > Window Component. In the next wizard step select for Position the value editor. Press next and select a name for your TopComponent class (and an icon if desired).

    Open the code of your TopComponent and in the init() method add the next lines:

    Model model = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME); WorldWindowGLCanvas wwj = new WorldWindowGLCanvas(); wwj.setModel(model); setLayout(new BorderLayout()); add(wwj, BorderLayout.CENTER);

    You will need to import the required packages from WWJ module, which you must set as a dependency previously.

If you have followed the above steps the result you must get must be something similar to:

In addition and the benefit of use these approach is your applciation, once build a ZIP distribution, will run on different machines thanks to the native libraries attached in the 'lib' folder.

Please, feel free to set any comments you think, ideas and suggestions.

I would like to have written this post some time ago but time is not something I have in exces.

This post starts when my friend Johann let me know the creation of the GeoToolkit project, a fork of GeoTools, started by one of the originals GeoTools authors. Take a look at project's history to know more details about the reasons.

Next is a simple example showing how to reproject coordinates from WSG84(EPSG:4326) to EPSG:3068 that, for those interested, I used in a program to render CityGML files in a Java 3D viewer called pTolemy3D.

public static boolean translate(GeneralDirectPosition source, GeneralDirectPosition target) { CRSAuthorityFactory factory = AuthorityFactoryFinder.getCRSAuthorityFactory("EPSG", null); try { ProjectedCRS projSource = factory.createProjectedCRS("3068"); GeodeticCRS projTarget = factory.createGeographicCRS("4326"); // NOTE: This is another way to create the right projection: // ProjectedCRS proj = (ProjectedCRS) CRS.decode("EPSG:3068"); // System.out.println("Orig: " + projSource); // System.out.println("Target: " + projTarget); MathTransform transform = CRS.findMathTransform(projSource, projTarget); // System.out.println("Transform: " + transform); try { transform.transform(source, target); return true; // System.out.println("Point Source: " + psource); // System.out.println("Point Target: " + ptarget); } catch (MismatchedDimensionException ex) { Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex); } catch (TransformException ex) { Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex); } } catch (NoSuchAuthorityCodeException ex) { Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex); } catch (FactoryException ex) { Logger.getLogger(GeoUtil.class.getName()).log(Level.SEVERE, null, ex); } return false; }

Not so much, but hope it will be useful for someone and hope more users start to use GeoToolkit.

Sometimes you need to remember a command line tool, refresh some concepts about a programming language, etc. Because this I want to post here two nice a very useful tools: technical posters and reference cards.

  • RefCards are normally a summary of things written in a two sides page.
  • Techposters are a similar concept but fills a great page.

I point only to two sites, but if you spend some time to find a bit more you could find other nice sites with great docs.

No doubt to put your comment and attach other sites with documentation (like scribd).