GWT on the go with gwt-mobile-webkit: A new project is underway started by a developer in the GWT community that provides GWT API bindings to HTML 5 features supported by Mobile WebKit. While the project more closely follows the WebKit implementation for HTML 5 features and other WebKit libraries, other browsers are also supported for various HTML 5 APIs. Check out the project homepage for more details.
GWT Gadgets riding the Wave: The Google Wave Gadget API is an awesome way to leverage the power of Wave in your gadgets. Thanks to the efforts of yet another great GWT community member, you can now more easily use the Google Wave Gadget API in your GWT developed Gadgets using the cobogwave project. This library builds on the existing GWT Gadgets support available in the Google API Libraries for GWT project.
GWT-GData v 1.10.1 released: Developed through the guidance of the GWT team, GWT community contributors and the main project lead, Bobby Soares, the gwt-gdata project recently had its 1.10.1 release. This is a nice library to access many of the GData APIs from Google Analytics to Google Maps Data. The full list of supported GData APIs can be found on the project page.
GWT-MVC 0.3 released: The MVC pattern has proven its usefulness in the domain of web application development time and time again. If this pattern is a good fit for the project you're planning or currently working on, you may want to check out the gwt-mvc project, which provides a layer of abstraction to make MVC modeled development easier in GWT.
GWT-Connectors 1.7 released: The gwt-connectors project is a really cool tool for developers who need to connect boxed components with connectors, and now includes connectors with arrow tips. You can check out the demo here, and if you like what you see and need it for your application, check out the project page for more information.
If you don't use Mac OS X 10.6 (Snow Leopard), the GWT 1.7.1 release shouldn't interest you much -- you shouldn't see any changes. If you do use Mac OS X 10.6, good news. Running GWT with Java 6 has become simpler. Download it here.
GWT's hosted mode uses the Standard Widget Toolkit (SWT), which only supports 32-bit operation. Hosted mode must therefore also run a 32-bit version of Java. Mac OS X 10.5 (Leopard) shipped with a 32-bit Java 5 and a 64-bit only Java 6. Java 5 was compatible with the 32-bit SWT bindings, so the GWT SDK directed users to use Java 5 only. With the Snow Leopard release, Apple only includes Java 6, but it now runs in both 32-bit and 64-bit modes.
In short, you can now run GWT on Snow Leopard using the Java command line argument -d32 without further modification. The GWT SDK no longer directs you to only use Java 5, and the ant scripts (including scripts generated by the webAppCreator tool) have been updated to include the -d32 flag where necessary. Also, Linux users will see a more informative error message when a non-32-bit Java runtime is used..
class RaphaelJS extends JavaScriptObject { protected static class Shape extends JavaScriptObject { public final native Shape rotate(double degree, boolean abs) /*-{ return this.rotate(degree, abs); }-*/; public final native Shape scale(double sx, double sy) /*-{ return this.scale(sx, sy); }-*/; public final native Shape translate(double dx, double dy) /*-{ return this.translate(dx, dy); }-*/; // ... } /** * factory method */ static public final native RaphaelJS create(Element e, int w, int h) /*-{ return $wnd.Raphael(e, w, h); }-*/; public final native Element node() /*-{ return this.node; }-*/; public final native Shape circle(double x, double y, double r) /*-{ return this.circle(x,y,r); }-*/; public final native Shape rect(double x, double y, double w, double h) /*-{ return this.rect(x, y, w, h); }-*/; // ... }
public class Raphael extends Widget { private RaphaelJS overlay; public class Shape extends Widget { protected RaphaelJS.Shape rs; protected Shape(RaphaelJS.Shape s) { setElement(s.node()); rs = s; } public Shape rotate(double degree, boolean isAbsolute) { rs.rotate(degree, isAbsolute); return this; } public Shape scale(double sx, double sy) { rs.scale(sx, sy); return this; } public Shape translate(double dx, double dy) { rs.translate(dx, dy); return this; } // ... } public class Circle extends Shape { public Circle(double x, double y, double r) { super(overlay.circle(x, y, r)); } } public class Rectangle extends Shape { public Rectangle(double x, double y, double w, double h) { super(overlay.rect(x, y, w, h)); } public Rectangle(double x, double y, double w, double h, double r) { super(overlay.rect(x, y, w, h, r)); } } public class Text extends Shape { public Text(double x, double y, String str) { super(overlay.text(x, y, str)); } } // ... public Raphael(int width, int height) { Element raphaelDiv = DOM.createDiv(); setElement(raphaelDiv); overlay = RaphaelJS.create(raphaelDiv, width, height); } }
public class MyDrawing extends Raphael { public MyDrawing(int width, int height) { super(width, height); Circle c = new Circle(width/2, height/2, 20); // Raphael automatically appends the Circle to this drawing } } public class MyApp implements EntryPoint { public void onModuleLoad() { MyDrawing d = new MyDrawing(Window.getClientWidth(), Window.getClientHeight()); RootPanel.get().add(d); } }
public class SelectRoleHandler implements DatabaseRequest.Handler { public void handle(DatabaseRequest.Result result) { for (int row=0; row < result.getRowCount(); row++) { JSONObject data_row = result.getRowValues(row); Role r = new Role(data_row); // process role... } } }
public class SelectRoleCallback implements RequestCallback { public void onError(Request request, Throwable exception) { Window.alert("Couldn't retrieve JSON"); } public void onResponseReceived(Request request, Response response) { if (200 == response.getStatusCode()) { JSONArray data_set = JSONParser.parse(response.getText()).isArray(); if (data_set != null) { for (int row=0; row < data_set.size(); row++) { JSONObject data_row = data_set.get(row).isObject(); Role r = new Role(data_row); // process role... } } } else { Window.alert("Couldn't retrieve JSON (" + response.getStatusText() + ")"); } } }