Alcatraz

August 22nd, 2007

My brother in law is over staying with us so an excuse to go and do some more touristy things like visit Alcatraz.

Slideshow of all photos….

Sunny San Francisco

August 22nd, 2007

I finally had a nice clear sunny day in San Francisco and a chance to take a couple pictures.

Slideshow of all photos….

SVG Shape 2 Java2D Code

July 8th, 2007

A couple weeks ago I needed to write some Java2D code to draw a water droplet. If you have ever tried coding bezier paths off the top of you head it is not the simplest of things and can be frustrating. So I ended up drawing it in Illustrator and saving as SVG. The next stage was hacking with some code I had from before to take the path and spit out Java2D code for the shape. I have been thinking since that I could cleanup the code when I get the time and make a little application for extracting path shapes from SVG and writing out the Java2D code for them. Well I finally got the time and here is what I came up with.

SvgShapeExtractor Screen Shot

Download:
SvgShapeExtractor.jar (Executable Jar)
SvgShapeExtractorSrc.zip (Src)

Hopefully you will find this useful next time you need to write some Java2D shape code.

SPAR Project Updated

June 26th, 2007

I have updated the SPAR project that I released with the code from my JavaOne talk on “Why Spaghetti is not Tasty - Architecting Large Scale Applications”. I have fixed issues stopping it working on Java 6 and improved the ant build process to make it simpler to build and run the Demo Application. There are now two ways to build and run the Spar Demo. If you have IntelliJ then you can just open the provided IntelliJ project and hit run, otherwise you can use Ant. Here are the instructions to get the demo and build and run it with Ant:

  • Prerequisites: Java 5 or 6, recent Apache Ant and a Subversion Client
  • Get the code from Subversion repository using your client, if you are using the command line then type this: svn checkout https://spar.dev.java.net/svn/spar/trunk/code spar --username {username} where {username} is your dev.java.net login.
  • cd into spar/spardemo
  • To build type: ant -f build-scripts/build.xml
  • To run type: ant -f build-scripts/build.xml run

The spar demo app at the moment is a very simple app that just brings up a UI with one of each of the main UI component types: SidePanels, Documents, Menus,Toolbars and Statusbars. As soon as I get time I will put some more work into making it a fully fledged simple application using the event bus and all the core functionality of the SPAR platform. It uses the JIDE docking framework at the moment though a abstraction layer, I have made a start on making a InfoNode plugin that will provide a alternative implementation.

I hope you have a more success now getting the demo application to run, any problems send me an email, Jasper

Nimbus L&F Update

June 6th, 2007

So it has been a while since I blogged about Nimbus, Java One has come and gone and I am sure you are all wondering whats happening to it. Well things have changed for Nimbus since it was announced at Desktop Matters conference in March. The initial plan was for Nimbus to be a open source project jointly run by Ben Galbraith and myself. In early prototype I hacked together thats available from nimbus.dev.java.net was very well accepted both inside Sun and in the swing community. As a result a decision was made to bring the Nimbus L&F into the JDK as part of the new Consumer JRE. What this means for is it will be available as part of the JDK 6 sometime early 2008. If you would like to read more about the Consumer JRE then read here.

Nimbus Coming Soon

I think this is amazing news for Nimbus L&F as it will hugely strengthen its adoptance. I am now working full time on getting Nimbus done with the tight deadlines to get it to you for early next year. The final version should be complete around August at which point I will try and get it released back to the open source project. Hopefully then we can get a good chunk of testing done on many different applications so we have a great version for the JDK. Ben has said that he will help with the effort to take it at that point and do a backport to run on JDK 5.

Here is my personal list of objectives for Nimbus L&F:

  • Create as high fidelity implementation of the SPEC as possible within the technical constraints.
  • Aim for 100% Java2D painted vector graphics, so no images other than icons. This is a ambitious aim as it is a lot more work than a image based L&F but will give us huge flexibility in the long run with things like high DPI monitors and resolution independence.
  • Be based on Synth so that there is finally a fully realized L&F from Sun for Synth that can be used to help other people create new Synth L&Fs.
  • Be as true feel wise to the native platform as possible within the tight deadlines. By this I mean using the native key combinations like Command C on Mac and Ctrl C on Windows for copy. Also to try and have the File Chooser for have a layout and functionalty as the native L&F one but with Nimbus skin.
  • Provide API or hooks so the Nimbus painting code can be used to aid skinning custom swing components.

These are what I would like to achieve with the Nimbus L&F, how much I can manage within the tight deadlines we will have to see. If features don’t get in then hopefully we can add them to the open source project and later back into the JDK. Animation is on the would really like to get it in pile but there as a lot to do before I get there.

I am very interested to hear any feedback you have on Nimbus, like feature X is crucial to my company using Nimbus or feature Y is not important to me. I will do my best to accommodate any good suggestions into Nimbus.