Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:03 Go to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 2
Registered: May 2011
Junior Member
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 17:05 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
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 19:15 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 2
Registered: May 2011
Junior Member
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 19:16]

Report message to a moderator

Re: SWT equivalent of AWT Component.addNotify() [message #871391 is a reply to message #674830] Sun, 13 May 2012 05:39 Go to previous message
Mujtaba Alshakhouri is currently offline Mujtaba AlshakhouriFriend
Messages: 1
Registered: May 2012
Junior Member
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: Fri Apr 26 10:27:00 GMT 2024

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

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

Back to the top