Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT equivalent of AWT Component.addNotify()
icon5.gif  SWT equivalent of AWT Component.addNotify() [message #674805] Sat, 28 May 2011 12:03 Go to next message
Eclipse UserFriend
Hi all,

I'm porting a AWT based project to SWT, in order to run it in eclipse as a plugin.

I'm stuck trying to find the SWT counterpart of AWT's Component.addNotify().
The description of what the method does is at the URL below (sorry but it's my first post, so I cannot
include links

download.oracle.com/javase/1.4.2/docs/api/java/awt/Component.html#addNotify()

I've been stuck on this for quite some time and I'm pretty desperate atm Sad

Thanks a lot!
Re: SWT equivalent of AWT Component.addNotify() [message #674816 is a reply to message #674805] Sat, 28 May 2011 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Il 28/05/2011 18:03, forums-noreply@eclipse.org ha scritto:
> Hi all,
>
> I'm porting a AWT based project to SWT, in order to run it in eclipse
> as a plugin.
>
> I'm stuck trying to find the SWT counterpart of AWT's
> Component.addNotify().
> The description of what the method does is at the URL below (sorry but
> it's my first post, so I cannot
> include links
>
> download.oracle.com/javase/1.4.2/docs/api/java/awt/Component.html#addNotify()

Uhm...
that link clearly states:

This method is called internally by the toolkit and should not be called
directly by programs.

What are You trying to do, exactly?

>
>
> I've been stuck on this for quite some time and I'm pretty desperate
> atm :(
> Thanks a lot!

Did You try yo use SWT-AWT bridge, for a starter?

http://www.eclipse.org/swt/faq.php#swinginswt

regards
Mauro
Re: SWT equivalent of AWT Component.addNotify() [message #674830 is a reply to message #674816] Sat, 28 May 2011 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mauro, thanks for your quick reply!

Mauro Condarelli wrote on Sat, 28 May 2011 13:05


This method is called internally by the toolkit and should not be called
directly by programs.
What are You trying to do, exactly?



I'm writing a small software visualization tool as an eclipse plugin.
For the rendering, I want to use JMonkeyEngine3 which is a renowned framework for writing opengl apps in java.
Unfortunately JME3 has no support for SWT's GLCanvas, therefore I'm trying to implement it myself.
The framework supports rendering in a AWT canvas. What I'm doing is taking that code and adapt it to GLCanvas.

JME3 kicks off a separate thread dedicated to the rendering; they use addNotify() in order to start rendering
only when the canvas has become visible.

I need the counterpart of addNotify() in order to start rendering only when GLCanvas is visible (and the opengl context is therefore ready).



Mauro Condarelli wrote on Sat, 28 May 2011 13:05

Did You try yo use SWT-AWT bridge, for a starter?


I'd prefer not to because, at least for the first version, my target platform is OSX and I read that some issues can arise when using SWT-AWT on OSX

[Updated on: Sat, 28 May 2011 15:16] by Moderator

Re: SWT equivalent of AWT Component.addNotify() [message #871391 is a reply to message #674830] Sun, 13 May 2012 01:39 Go to previous message
Eclipse UserFriend
Hello!

Have you succeeded in using jME3 inside SWT's GLCanvas? I'm new to Eclipse plugin/RCP and trying to do exactly the same, building some software visualization plugin and using jme3 for rendering. If you have succeeded in your effort, would you mind providing any guidance/help on how to quickly achieve this?

Thank you very much,
Mujtaba
Previous Topic:How can a widget be disposed without a call to dispose()?
Next Topic:Trouble running code on Windows
Goto Forum:
  


Current Time: Sat Aug 30 18:01:22 EDT 2025

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

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

Back to the top