Thanks you for those links to those other tools. They look very promising. In general I agree that working through GWT is the wrong way to go, since a 'native' javascript can always be wrapped by GWT anyway. I was just hoping to get a familiar API up and running quickly. Looking at the existing Piccolo.js stuff, that looks very promising as well.
I will have to spend some time evaluating these new (to me) libraries and piccolo.js. Thanks -Lucas On Tue, May 4, 2010 at 3:50 PM, Michael Heuer <heue...@gmail.com> wrote: > lucasjordan wrote: > > > I seem to have started down a possibly foolish path and I wanted to > > get some feedback. > > Nothing foolish about this -- several piccolo developers have thoughts > in this direction as well. > > > > I have started porting Piccolo to the new HTML5 Canvas API. > > See also > > http://code.google.com/p/piccolo2d/source/browse#svn/piccolo2d.js/trunk > > > > Basically I am using GWT to take as much of the Java Code from > > Piccolo2D and use the project gwt-canvas to provide the Graphics2D > > type functionality. Since Piccolo depends so heavily on java.awt and > > java.awt.geom and the awt packages are not supported in GWT I am > > including a copy of those source files in the GWT project. For > > example, Piccolo depends on java.awt.Rectangle, so I copy the existing > > Rectangle class to a java.gwt.Rectangle and simply change the import > > statement in the Piccolo code. > > I don't think copying java code through GWT is the right direction to > go. If you're planning on writing javascript, write it directly. > There are several vis libraries written on javascript already, > including > > Protovis > http://vis.stanford.edu/protovis/ > > Processing.js > http://processingjs.org/ > > JavaScript InfoVis Toolkit > http://thejit.org/ > > > > Copying the awt classes looks like it is going to work in general but > > there are few problems which have shown themselves. First, most of the > > geometry type classes (Rectangle2D, Point2D, etc) only depend on them > > selves and java.lang.Math, so this makes them viable classes to be > > used with GWT, but some of them depends on internal sun.java.bla.bla.* > > classes, which I don't currently have the source code for. The second > > problem as I have not had a chance to review the legal issue in > > reusing Oracle's code in this way. I has occurred to me I might have > > better luck taking the code from Apache's project harmony, but again I > > have not gotten that far. For that matter I am not sure about altering > > the Piccolo2D code either. > > Piccolo2D's license is clear. So is Project Harmony's. Using JDK > code is much more iffy. > > michael > > -- > Piccolo2D Developers Group: > http://groups.google.com/group/piccolo2d-dev?hl=en > -- Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en