Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Embedding Swing toolbar using SWT_AWT Bridge?
Embedding Swing toolbar using SWT_AWT Bridge? [message #327230] Mon, 14 April 2008 12:58 Go to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi,

A part of what I am doing involves moving an already existing Swing toolbar
to Eclipse (native). Instead of defining a new action for each action within
the toolbar, is it possible for me to bring the existing Swing toolbar into
Eclipse using the SWT_AWT Bridge?

Thanks,
Rahul
Re: Embedding Swing toolbar using SWT_AWT Bridge? [message #327232 is a reply to message #327230] Mon, 14 April 2008 13:08 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You should ask this in eclipse.platform.swt, they'll have a better
understanding of the SWT_AWT bridge.

Off the top of my head, I would say: 1) you can probably use a Swing
toolbar in a Swing JFrame embedded in an SWT Composite using SWT_AWT and
2) you can't place your Swing toolbar in the eclipse main
toolbar/coolbar, SWT_AWT can't bridge a Swing toolbar into an SWT toolbar.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Re: Embedding Swing toolbar using SWT_AWT Bridge? [message #327234 is a reply to message #327232] Mon, 14 April 2008 13:05 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
SWT Composite means basically I am looking at a view placeholder? I'll put
the query in that group as well.

Thanks Paul for the quick reply!

Rahul

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:ftvkl8$qjo$1@build.eclipse.org...
> You should ask this in eclipse.platform.swt, they'll have a better
> understanding of the SWT_AWT bridge.
>
> Off the top of my head, I would say: 1) you can probably use a Swing
> toolbar in a Swing JFrame embedded in an SWT Composite using SWT_AWT and
> 2) you can't place your Swing toolbar in the eclipse main toolbar/coolbar,
> SWT_AWT can't bridge a Swing toolbar into an SWT toolbar.
>
> PW
>
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
> http://wiki.eclipse.org/Menus_Extension_Mapping
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Embedding Swing toolbar using SWT_AWT Bridge? [message #327339 is a reply to message #327230] Tue, 15 April 2008 19:35 Go to previous messageGo to next message
Stuart Pond is currently offline Stuart PondFriend
Messages: 27
Registered: July 2009
Junior Member
Rahul,

There is an excellent article on Swing/SWT integration at the following link
http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html

One of the suggestions is to use a JApplet underneath your AWT Frame you get
from the SWT_AWT Bridge. You may even setJMenuBar() on the applet object.

I hope this helps.

-Stu Pond

"Rahul Kamdar" <rtkamdar@kamdars-india.com> wrote in message
news:ftvkd2$rvn$1@build.eclipse.org...
> Hi,
>
> A part of what I am doing involves moving an already existing Swing
> toolbar to Eclipse (native). Instead of defining a new action for each
> action within the toolbar, is it possible for me to bring the existing
> Swing toolbar into Eclipse using the SWT_AWT Bridge?
>
> Thanks,
> Rahul
>
Re: Embedding Swing toolbar using SWT_AWT Bridge? [message #327441 is a reply to message #327339] Sun, 20 April 2008 12:35 Go to previous messageGo to next message
Rahul Kamdar is currently offline Rahul KamdarFriend
Messages: 63
Registered: July 2009
Member
Hi Stuart,

Thanks for the help! I did check out the article but am still trying to
figure out what exactly will be right for my requirement. I am using a
JApplet underneath the AWT Frame returned by the SWT_AWT method call. I'll
also check out setJMenuBar() and see how it works for me.

Thanks again,
Rahul

"Stuart Pond" <Stuart.Pond@ugs.com> wrote in message
news:fu301o$40h$1@build.eclipse.org...
> Rahul,
>
> There is an excellent article on Swing/SWT integration at the following
> link
> http://www.eclipse.org/articles/article.php?file=Article-Swi ng-SWT-Integration/index.html
>
> One of the suggestions is to use a JApplet underneath your AWT Frame you
> get from the SWT_AWT Bridge. You may even setJMenuBar() on the applet
> object.
>
> I hope this helps.
>
> -Stu Pond
>
> "Rahul Kamdar" <rtkamdar@kamdars-india.com> wrote in message
> news:ftvkd2$rvn$1@build.eclipse.org...
>> Hi,
>>
>> A part of what I am doing involves moving an already existing Swing
>> toolbar to Eclipse (native). Instead of defining a new action for each
>> action within the toolbar, is it possible for me to bring the existing
>> Swing toolbar into Eclipse using the SWT_AWT Bridge?
>>
>> Thanks,
>> Rahul
>>
>
>
Re: Embedding Swing toolbar using SWT_AWT Bridge? [message #327443 is a reply to message #327230] Sun, 20 April 2008 14:05 Go to previous message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

As an alternative have a look at the Albireo project
which adresses a lot of problems with the swt_awt bridge
and offers an easy to use API to integrate Swing components.

http://wiki.eclipse.org/Albireo_Project
Previous Topic:Issue with deletion of a file and refresh
Next Topic:eclipse freezes after field retrieving
Goto Forum:
  


Current Time: Wed Nov 26 10:34:20 GMT 2014

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

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