Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How is Eclipse's swing integration these days?
How is Eclipse's swing integration these days? [message #254315] Mon, 21 June 2004 16:53 Go to next message
Eclipse UserFriend
Originally posted by: bdkucer.sandia.gov

If I make a Swing GUI based off a JFrame, is it possible/plausible to
insert that as a whole into a view?
Re: How is Eclipse's swing integration these days? [message #254330 is a reply to message #254315] Mon, 21 June 2004 17:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hildegarde_roth.hayoo.de

Supposedly yes. Look for the SWT_AWT class.

Hilde
Re: How is Eclipse's swing integration these days? [message #254332 is a reply to message #254330] Mon, 21 June 2004 17:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bdkucer.sandia.gov

I was hoping for some real-world usage stories. :-)

Hilde Roth wrote:

> Supposedly yes. Look for the SWT_AWT class.

> Hilde
Re: How is Eclipse's swing integration these days? [message #254339 is a reply to message #254332] Mon, 21 June 2004 17:33 Go to previous messageGo to next message
Henning Rogge is currently offline Henning RoggeFriend
Messages: 148
Registered: July 2009
Senior Member
Brent Kucera wrote:
> I was hoping for some real-world usage stories. :-)

It does work, I'm using a JTextPane inside my RCP. But you have to do
some things by hand like to get the correct SWT popups/menus or
scrolling handling.

Henning Rogge
Re: How is Eclipse's swing integration these days? [message #254342 is a reply to message #254315] Mon, 21 June 2004 17:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bdkucer.sandia.gov

Brent Kucera wrote:

> If I make a Swing GUI based off a JFrame, is it possible/plausible to
> insert that as a whole into a view?

Let me try to flesh this out a little bit. Suppose I'm have a complex
simulation environment that right now exists as its own window based on a
JFrame. It does quite a bit of drawing on a JPanel, responds to mouse
events, supports dragging and dropping, etc.

What are my chances of being able to drop that into a view in Eclipse?
What problems am I likely to encounter?

The reason I ask is that if we decide we want to be able to have the
simulation environment exist either within Eclipse or as an external
window, it seems simple enough to do as long as both GUIs are written in
SWT. Nobody has any experience with SWT here except for me, and I just
barely started playing with it. So if it's possible to write the GUI in
Swing and just drop it inside a view, that might be better.
Re: How is Eclipse's swing integration these days? [message #254346 is a reply to message #254342] Mon, 21 June 2004 17:56 Go to previous messageGo to next message
Henning Rogge is currently offline Henning RoggeFriend
Messages: 148
Registered: July 2009
Senior Member
Brent Kucera wrote:

> Let me try to flesh this out a little bit. Suppose I'm have a complex
> simulation environment that right now exists as its own window based on a
> JFrame. It does quite a bit of drawing on a JPanel, responds to mouse
> events, supports dragging and dropping, etc.
>
> What are my chances of being able to drop that into a view in Eclipse?
> What problems am I likely to encounter?
>
> The reason I ask is that if we decide we want to be able to have the
> simulation environment exist either within Eclipse or as an external
> window, it seems simple enough to do as long as both GUIs are written in
> SWT. Nobody has any experience with SWT here except for me, and I just
> barely started playing with it. So if it's possible to write the GUI in
> Swing and just drop it inside a view, that might be better.

Just drop it into the AWT_SWT interface and see what happens... it might
work very well or it might be a lot of work, I have only experimented
with a few Swing elements inside SWT.

Henning Rogge
Re: How is Eclipse's swing integration these days? [message #254372 is a reply to message #254339] Mon, 21 June 2004 19:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hildegarde_roth.hayoo.de

> But you have to do some things by hand like to get the correct SWT
> popups/menus or scrolling handling.

Could you expatiate on that a little? That would be useful.

Hilde
Re: How is Eclipse's swing integration these days? [message #254387 is a reply to message #254372] Mon, 21 June 2004 20:05 Go to previous message
Henning Rogge is currently offline Henning RoggeFriend
Messages: 148
Registered: July 2009
Senior Member
Hilde Roth wrote:

>>But you have to do some things by hand like to get the correct SWT
>>popups/menus or scrolling handling.
>
>
> Could you expatiate on that a little? That would be useful.

It's easy to use a Swing-Popup within the Swing part, but this doesn't
work well... it has a different appearance than the SWT Popups and it
doesn't close automatically when you open an SWT Popup ! So you have to
write some Swing-Listeners that activate SWT-Popups by hand if you want
to have a "smooth" look.

The problem with scrolling is that I didn't managed to put a Swing-part
into an SWT ScrolledComposite... so I would have to use a JScrollPane.
But the scrollbars of the JScrollPane have a different look than the SWT
ones, so I had to write a workaround.

Henning Rogge
Previous Topic:Method overload syntax
Next Topic:Life cycle of a view
Goto Forum:
  


Current Time: Tue Nov 19 13:52:23 GMT 2024

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

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

Back to the top