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.

  • Posted at 8:47 am, July 8, 2009

    Very good, i interesting this project.

  • Joe
    Posted at 4:06 pm, July 8, 2009

    Looking forward to see it! Very cool stuff.

  • Sunil
    Posted at 10:10 am, August 29, 2009

    I am a newbie to RAP but i am really interested in this project.

    We used RAP with BIRT to create charts on server side and then render to the client as images.

    A few questions which comes to my mind
    1. Does the RAP incubator means that we don’t have to integrate BIRT anymore and all the charts creations will be done at the client side( browser).
    2. Charts displayed can be made more interactive. correct ?
    3. Much faster speed, as everything will be done on client. correct ?
    4. Do we need to have any license from google for using their APIs ?
    5. Does an application need an internet access while running it ?


  • Benjamin Muskalla
    Posted at 11:30 am, August 31, 2009

    For those of you who want to follow the discussion above regarding RAP, BIRT and other graphic-related stuff, see this thread: