Introducing RAP Incubator

Introducing RAP Incubator

With all excitement for the Galileo release, we totally missed to mention that the RAP Incubator project was approved. This is a great way to accept, distribute and mature community contributions. I look forward to some new widgets and improved tooling. For starters the project contains:

  • chart support via the Google Visualization Widgets
  • the GCCanvas widget
  • an editor for RAP themes

Read on for more details on these goodies.

Google Visualization Widgets

This project contains over 10 new RAP widgets:


Note that the widgets are interactive – they are not just static images. The widgets have an SWT-like java interface and are build around Google’s Visualization APIs. They have been contributed by David Donohue and were originally developed for the inqle project.

Here’s some example code:

JSONGoogleDataTable dataTable = new JSONGoogleDataTable();
dataTable.addColumn("Activity", "Activity", "string", null);
dataTable.addColumn("Hours", "Hours per Week", "number", null);
dataTable.addRow(new Object[] {"Design", 12});
dataTable.addRow(new Object[] {"Development", 16});
dataTable.addRow(new Object[] {"Testing", 8});
dataTable.addRow(new Object[] {"Documentation", 4});
String widgetData = dataTable.toString();

PieChart pieChart = new PieChart( parent, SWT.NONE );
pieChart.setWidgetOptions("{width: 300, height: 300, is3D:true, legend:'none'}");
GridDataFactory.fillDefaults().hint(300, 300).applyTo(pieChart);
JSONGoogleDataTable dataTable = new JSONGoogleDataTable();
dataTable.addColumn(“Activity”, “Activity”, “string”, null);
dataTable.addColumn(“Hours”, “Hours per Week”, “number”, null);
dataTable.addRow(new Object[] {“Design”, 30});
dataTable.addRow(new Object[] {“Development”, 40});
dataTable.addRow(new Object[] {“Testing”, 20});
dataTable.addRow(new Object[] {“Documentation”, 10});
String widgetData = dataTable.toString();
PieChart pieChart = new PieChart( parent, SWT.NONE );
pieChart.setWidgetOptions(“{width: 300, height: 300, is3D:true, legend:’none’}”);
GridDataFactory.fillDefaults().hint(300, 300).applyTo(pieChart);

GCCanvas Widget

On of the most requested features in RAP is the ability to paint directly in the browser using Java. The GCCanvas widget developed by Mirko Solazzi makes this possible. It provides a Java API around  the Explorer Canvas java-script widget. This way one can draw in the browser without having to use flash or an applet.


Here’s some example code:

canvas = new GCCanvas( shell, SWT.NONE);
canvas.setSize(500, 500);
canvas.drawLine(100, 100, 200, 200);
canvas.drawLine(200, 200, 500, 0);

RAP Theme Editor

This editor should make it much easier to customize the css-based themes used by RAP. It provides structured editing for the themeable RAP widgets. It was developed by Matthias Schaeffner during last year’s ‘google summer of code’.  The screenshots on the Eclipse wiki look very promising. Currently the tool has some issues with the recent RAP 1.2 release but we intend to fix that.


Note, please be patient while the project is created and provisioned.

If you need access to the code now follow the links in the project proposal.