Introducing the Rich Ajax Platform (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:

rap incub charts Introducing the Rich Ajax Platform (RAP) Incubator

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'}");
pieChart.setWidgetData(widgetData);
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’}”);
pieChart.setWidgetData(widgetData);
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.

rap incub canvas Introducing the Rich Ajax Platform (RAP) Incubator

Here’s some example code:

canvas = new GCCanvas( shell, SWT.NONE);
canvas.setSize(500, 500);
canvas.setForeground(display.getSystemColor(SWT.COLOR_RED));
canvas.setLineWidth(5);
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.

rap incub themeditor Introducing the Rich Ajax Platform (RAP) Incubator

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.

4 Responses to “Introducing the Rich Ajax Platform (RAP) Incubator”

  1. hangum says:

    Very good, i interesting this project.

  2. Joe says:

    Looking forward to see it! Very cool stuff.

  3. Sunil says:

    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 ?

    -Sunil

  4. Benjamin Muskalla says:

    For those of you who want to follow the discussion above regarding RAP, BIRT and other graphic-related stuff, see this thread: http://markmail.org/search/?q=rap#query:rap%20list%3Aorg.eclipse.rap-dev%20order%3Adate-backward+page:1+mid:sx6pzruosof4hcfy+state:results

4 responses so far

Written by . Published in Categories: Planet Eclipse