Thursday, 15 October 2009
Darling Harbour Eats
FOSS4G is happening next week! It seems like a long way away - and it is the other side of the world for a lot of people. Given that it is the other side of the street from LISAsoft offices I am going to try and give some pointers on where to eat.
I will start with where people will actually be:
Now this location is nothing fancy - but here is the deal. It is open 24 hours; and a lot of attendees will be jet lagged - and this place will be open.
And you know ... pancakes.
Monday, 7 September 2009
Taking Boiler Plate out of Examples
I was reviewing the GeoTools example code today with Michael Bedward - preparing for an a tutorial at FOSS4G this year.
One of the things that always comes up in example code; is the requirement to "show" the result. As a result a the majority of our example code was actually examples of how create quick and dirty swing user interfaces.
So our day was spent stripping out boilerplate user interface code to a jar appropriately tilted "gt-swing" so that examples can stay focused on being examples.
Here is a small example of a wizard page for connecting to a shape file:

Here is before:
Documentation harmed in the making of todays blog:
One of the things that always comes up in example code; is the requirement to "show" the result. As a result a the majority of our example code was actually examples of how create quick and dirty swing user interfaces.
So our day was spent stripping out boilerplate user interface code to a jar appropriately tilted "gt-swing" so that examples can stay focused on being examples.
Here is a small example of a wizard page for connecting to a shape file:

Here is before:
File file;
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Open Shapefile for Reprojection");
chooser.setFileFilter(new FileFilter() {
public boolean accept(File f) {
return f.isDirectory() || f.getPath().endsWith("shp")
|| f.getPath().endsWith("SHP");
}
public String getDescription() {
return "Shapefiles";
}
});
int returnVal = chooser.showOpenDialog(null);
if (returnVal != JFileChooser.APPROVE_OPTION) {
System.exit(0);
}
file = chooser.getSelectedFile();
And here is after:
File file = JFileDataStoreChooser.showOpenFile("shp", parent );
Documentation harmed in the making of todays blog:
Subscribe to:
Posts (Atom)