Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

on Mar 2nd, 2009A Zesty e4

Over the past week I have ignored my daughters, gave-up on work, haven’t seem my wife, and managed to create a web-enabled version of Zest.  Ok, most of what I said is lie, however, I did manage to create a web-enabled version of Zest while still spending quality time with the family (and getting some “real work” done).

How you ask? The magic of “SWT Browser Edition” in e4. Since e4 is already able to  cross compile the Draw2D examples, I thought I would take a shot at producing an e4 Graph Widget based on Zest.

public static void main(String[] args) {
     Display d = new Display();
     Shell shell = new Shell(d);
     shell.setLayout(new FillLayout());
     Graph g = new Graph(shell, SWT.NONE);
     GraphNode n1 = new GraphNode(g, SWT.NONE, "SWT");
     GraphNode n2 = new GraphNode(g, SWT.NONE, "Action Script");
     GraphNode n3 = new GraphNode(g, SWT.NONE, "Totally Awesome");
     new GraphConnection(g, SWT.NONE, n1, n2);
     new GraphConnection(g, SWT.NONE, n2, n3);
     new GraphConnection(g, SWT.NONE, n3, n1);
}

Using the SWT -> Action Script cross compiler, I was able to take the Zest widget and build an SWF file for it. I managed to create a small example.

Zest in a Browser

There are a number of outstanding issues (no JFace adapters, no curved lines and some layouts are giving me grief), but it’s a start.

What do you think, should I bring this to e4?

Share and Enjoy:

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • Twitter
  • FriendFeed
  • LinkedIn
  • Reddit
  • Slashdot

Related posts:

4 Responses to “A Zesty e4”

  1. Cool! Bringing this to e4 would be great. We need to start the conversation about how JFace needs to be split into separate pieces, so that you can get more of Zest working.

  2. Ian says:

    Thanks Boris.

    Should I post this to the e4-dev list?

  3. I would say go for it Ian… as Boris says, this could kickstart a discussion in splitting up JFace in relevant pieces. If I recall, I believe Tom Schindl was also interested in splitting up JFace for some of his UFaceKit work.

    Cool stuff btw!

  4. David Karam says:

    A web-enabled Zest is a fantastic validation of the SWT Browser Edition! Thank you for publishing your work. Just curious, what is the file size of the compiled SWF?

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
© EclipseSource 2008 - 2009