Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » [OT] insert swing or swt widgets in gef editor
[OT] insert swing or swt widgets in gef editor [message #123253] Mon, 17 April 2006 19:42 Go to next message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
Hi.

First of all excuse me for my bad english. I think this is not a VE
question, but I don't know where else to ask. I also have tried to ask
this in the GEF newsgroup but they didn't reply.

I know that the Visual Editor was developed using GEF (graphic eclipse
framework). Well, I'm developing a visual editor using GEF and I need to
add swing or swt widgets to the editor. But as I know, GEF only let me add
IFigures. I would like to know how you add swing and swt components in VE
using GEF. I looked in VE source code, but I couldn't find the gef edit
parts corresponding to any swing/swt widget.

Well, hope you understand. Thanks in advance.

Sebastián Gurin
Re: [OT] insert swing or swt widgets in gef editor [message #123266 is a reply to message #123253] Mon, 17 April 2006 20:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
snapshot image of the Swing/SWT component and gives it to an IFigure
that takes an Image.

--
Thanks,
Rich Kulp
Re: [OT] insert swing or swt widgets in gef editor [message #123276 is a reply to message #123266] Mon, 17 April 2006 15:46 Go to previous messageGo to next message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
Thanks. that really will help me.

On Mon, 17 Apr 2006 16:07:56 -0400
Rich Kulp <richkulp@us.NO_SPAM.ibm.com> wrote:

> The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
> snapshot image of the Swing/SWT component and gives it to an IFigure
> that takes an Image.
Re: [OT] insert swing or swt widgets in gef editor [message #123440 is a reply to message #123266] Wed, 19 April 2006 13:44 Go to previous messageGo to next message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
On Mon, 17 Apr 2006 16:07:56 -0400
Rich Kulp <richkulp@us.NO_SPAM.ibm.com> wrote:

> The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
> snapshot image of the Swing/SWT component and gives it to an IFigure
> that takes an Image.
>

First of all, thanks Rich for the info. I would like more information about how to take these "snapshots". Basically I would like to take snapshots to swing widgets. I'm investigating the java.awt.Component's createImage() methods, but I really don't know how to use them. I know this is an OT, but I would apprecciate if somebody tell me what is the Visual Editor plugin class responsible for taking these "snapshots" to the swing components.

Well, thanks in advance.

> --
> Thanks,
> Rich Kulp
Re: [OT] insert swing or swt widgets in gef editor [message #123450 is a reply to message #123440] Wed, 19 April 2006 19:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

The image capture for Swing is done by the class ImageDataCollector in
the org.eclipse.ve.jfc plug-in:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.jfc/ vm_jfcvm/org/eclipse/ve/internal/jfc/vm/ImageDataCollector.j ava?rev=1.11&cvsroot=Tools_Project&content-type=text /vnd.viewcvs-markup

Specifically the call that does the magic is Component.printAll(Graphics
g):
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.h tml#printAll(java.awt.Graphics)

Hope this helps,
- Jeff
Re: [OT] insert swing or swt widgets in gef editor [message #123711 is a reply to message #123450] Fri, 21 April 2006 14:10 Go to previous message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
First of all, thank you very much to Jeff for the links. Lamentably, I could'n extract
the VE part that "take the snapshot" to swing components (good code but so complex!).

Nevertheless, I have developed some classes that construct a draw2d ImageFigure from
any swing component, but I think is less efficient that VE mechanism. I use a standar
format (png) for the transition of AWT BufferedImage to SWT Image but this transition
is done in memory, so the efficience is yet aceptable. People interested can download
this classes from http://cancerbero.0moola.com/source/swingInGEF.zip.

Sadudos!

--
Cancerbero


On Wed, 19 Apr 2006 15:06:48 -0400
Jeff Myers <jefmyers@us.ibm.com> wrote:

> The image capture for Swing is done by the class ImageDataCollector in
> the org.eclipse.ve.jfc plug-in:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.jfc/ vm_jfcvm/org/eclipse/ve/internal/jfc/vm/ImageDataCollector.j ava?rev=1.11&cvsroot=Tools_Project&content-type=text /vnd.viewcvs-markup
>
> Specifically the call that does the magic is Component.printAll(Graphics
> g):
> http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.h tml#printAll(java.awt.Graphics)
>
> Hope this helps,
> - Jeff
Re: [OT] insert swing or swt widgets in gef editor [message #612667 is a reply to message #123253] Mon, 17 April 2006 20:07 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
snapshot image of the Swing/SWT component and gives it to an IFigure
that takes an Image.

--
Thanks,
Rich Kulp
Re: [OT] insert swing or swt widgets in gef editor [message #612669 is a reply to message #123266] Mon, 17 April 2006 15:46 Go to previous message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
Thanks. that really will help me.

On Mon, 17 Apr 2006 16:07:56 -0400
Rich Kulp <richkulp@us.NO_SPAM.ibm.com> wrote:

> The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
> snapshot image of the Swing/SWT component and gives it to an IFigure
> that takes an Image.
Re: [OT] insert swing or swt widgets in gef editor [message #612699 is a reply to message #123266] Wed, 19 April 2006 13:44 Go to previous message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
On Mon, 17 Apr 2006 16:07:56 -0400
Rich Kulp <richkulp@us.NO_SPAM.ibm.com> wrote:

> The VE doesn't add Swing/SWT to GEF. It uses IFigures and gets a
> snapshot image of the Swing/SWT component and gives it to an IFigure
> that takes an Image.
>

First of all, thanks Rich for the info. I would like more information about how to take these "snapshots". Basically I would like to take snapshots to swing widgets. I'm investigating the java.awt.Component's createImage() methods, but I really don't know how to use them. I know this is an OT, but I would apprecciate if somebody tell me what is the Visual Editor plugin class responsible for taking these "snapshots" to the swing components.

Well, thanks in advance.

> --
> Thanks,
> Rich Kulp
Re: [OT] insert swing or swt widgets in gef editor [message #612701 is a reply to message #123440] Wed, 19 April 2006 19:06 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
The image capture for Swing is done by the class ImageDataCollector in
the org.eclipse.ve.jfc plug-in:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.jfc/ vm_jfcvm/org/eclipse/ve/internal/jfc/vm/ImageDataCollector.j ava?rev=1.11&cvsroot=Tools_Project&content-type=text /vnd.viewcvs-markup

Specifically the call that does the magic is Component.printAll(Graphics
g):
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.h tml#printAll(java.awt.Graphics)

Hope this helps,
- Jeff
Re: [OT] insert swing or swt widgets in gef editor [message #612736 is a reply to message #123450] Fri, 21 April 2006 14:10 Go to previous message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
First of all, thank you very much to Jeff for the links. Lamentably, I could'n extract
the VE part that "take the snapshot" to swing components (good code but so complex!).

Nevertheless, I have developed some classes that construct a draw2d ImageFigure from
any swing component, but I think is less efficient that VE mechanism. I use a standar
format (png) for the transition of AWT BufferedImage to SWT Image but this transition
is done in memory, so the efficience is yet aceptable. People interested can download
this classes from http://cancerbero.0moola.com/source/swingInGEF.zip

Sadudos!

--
Cancerbero


On Wed, 19 Apr 2006 15:06:48 -0400
Jeff Myers <jefmyers@us.ibm.com> wrote:

> The image capture for Swing is done by the class ImageDataCollector in
> the org.eclipse.ve.jfc plug-in:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.jfc/ vm_jfcvm/org/eclipse/ve/internal/jfc/vm/ImageDataCollector.j ava?rev=1.11&cvsroot=Tools_Project&content-type=text /vnd.viewcvs-markup
>
> Specifically the call that does the magic is Component.printAll(Graphics
> g):
> http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.h tml#printAll(java.awt.Graphics)
>
> Hope this helps,
> - Jeff
Previous Topic:VE doesn't display components properly
Next Topic:Not able to Install
Goto Forum:
  


Current Time: Tue Apr 23 12:05:15 GMT 2024

Powered by FUDForum. Page generated in 0.03354 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top