I had an idea ... I'll just use a Graphics2D from a BufferedImage draw in to it, then copy the image data over to an SWT image and draw that on screen... then thought, I better check to see if anyone else had done that already and they had (probably better than I would have as well) :
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SWT2DUnicode.htm So after lifting that code and tinkering around, for your consideration, here is version 0.0.1 of the Pivot WTKX Editor Eclipse plugin: http://dl.dropbox.com/u/2451973/pivot/plugins/org.apache.pivot.wtkxeditor_0.0.1.jar It has a new file wizard and associates WTKX files to the WTKX editor. However, since WTKX's base type is XML (and I needed to use that association to get the code work) it may open the built in XML Editor. Simply close this, right click on the WTKX file and choose Open With -> Pivot WTKX Editor and it should open an XML editor with 3 pages, the 3rd being 'preview'. Note that there's very little error checking going and it's basically parsing your WTKX as you type. Once you hit preview it renderers your WTKX *if it is valid* (my next task is to report errors). You will need to use *Eclipse 3.5* and have the *Web Standard Tools* feature installed (you can get this from the Eclipse update site : Help -> Install Software... ). For quick installation, just drop it in to your eclipse/dropins folder and restart Eclipse. If that doesn't seem to work, move it in your eclipse/plugins folder. Obviously, there's lots of things still to do and that could be done with this - all disclaimers apply! =) Also, I need to work out where to put the source and how to integrate it with the build - if at all. Feedback, bug reports, suggestions, all welcome. :) Cheers, Chris 2009/11/15 Christopher Brind <[email protected]> > Thanks Todd, will give that a whirl later. > > On 15 Nov 2009 13:09, "Todd Volkert" <[email protected]> wrote: > > My guess is that it's because Button is an abstract class - try <PushButton > buttonData="Sumit" />. Also, I think you should be calling > window.setContent(c) instead of window.add(c). > > Give those a shot, and hopefully it'll work - exciting stuff! > > -T > > On Sun, Nov 15, 2009 at 7:25 AM, Christopher Brind <[email protected] > >wrote: > > > Typical - I just hit send and then I realise I can create my own Graphics > > 2D > sub-class and ju... > >
