Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » emulating glass pane
emulating glass pane [message #456686] Mon, 06 June 2005 21:55 Go to next message
Eclipse UserFriend
Originally posted by: tmchild.gmx.net

Hi All

I'm looking to write a very simple GUI designer using swt.

The JavaBean Development Kit (BDK) available here
http://java.sun.com/products/javabeans/software/bdk_download .html uses a
glass pane to draw boxes and handles around GUI components and to intercept
mouse events for manipulating those components.

The glass pane makes it much easier to write code for manipulating GUI
controls sitting 'behind' it - while still allowing those controls to be
drawn using the actual widgets.

Can anyone suggest how I can achieve a similar result using SWT?

I know there are several SWT GUI designers - and I assume that they use
actual SWT widgets in 'design mode' so it must be possible to do something
like a glass pane in SWT.

All help gratefully received.

Cheers

Terry Child
Re: emulating glass pane [message #456691 is a reply to message #456686] Tue, 07 June 2005 05:47 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
Terry Child:

> I know there are several SWT GUI designers - and I assume that they use
> actual SWT widgets in 'design mode' so it must be possible to do something
> like a glass pane in SWT.

No, we show screenshots on widgets on design canvas and use GEF to
show handles.

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)


Konstantin Scheglov,
Google, Inc.
Re: emulating glass pane [message #456700 is a reply to message #456691] Tue, 07 June 2005 10:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: terry.child.vixensoft.co.uk

Hi Konstantin

Thanks for the reply.

From looking at your web site it seems that you draw and layout everything
using your own code.

How do handle custom widgets?

You product is much more advanced than I need. I want to do something much
simpler and use the existing widgets and layout managers as much as
possible.

That's what I like about the BeanBox application - it lets you manipulate
actual live widgets.

I guess what I need is some sort of transparent canvas - if that's even
possible with SWT?

Cheers

Terry Child





"Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
news:mbOocRyaFHA.2692@fairy.ao.nlmk...
> Terry Child:
>
>> I know there are several SWT GUI designers - and I assume that they use
>> actual SWT widgets in 'design mode' so it must be possible to do
>> something like a glass pane in SWT.
>
> No, we show screenshots on widgets on design canvas and use GEF to show
> handles.
>
> --
> SY, Konstantin.
> Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Re: emulating glass pane [message #456702 is a reply to message #456700] Tue, 07 June 2005 10:28 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
Terry Child:

> From looking at your web site it seems that you draw and layout everything
> using your own code.

No, we use layouts and controls that we see in source code.

> How do handle custom widgets?

We instantiate them.

> You product is much more advanced than I need. I want to do something much
> simpler and use the existing widgets and layout managers as much as
> possible.

Under Win32 you can use WM_PRINT message to get screenshot of SWT
controls.

> That's what I like about the BeanBox application - it lets you manipulate
> actual live widgets.
>
> I guess what I need is some sort of transparent canvas - if that's even
> possible with SWT?

I think no.



> "Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
> news:mbOocRyaFHA.2692@fairy.ao.nlmk...
>
>>Terry Child:
>>
>>
>>>I know there are several SWT GUI designers - and I assume that they use
>>>actual SWT widgets in 'design mode' so it must be possible to do
>>>something like a glass pane in SWT.
>>
>> No, we show screenshots on widgets on design canvas and use GEF to show
>>handles.
>>
>>--
>>SY, Konstantin.
>>Advanced Eclipse SWT Designer (http://www.swt-designer.com)
>
>
>


--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)


Konstantin Scheglov,
Google, Inc.
Re: emulating glass pane [message #456715 is a reply to message #456702] Tue, 07 June 2005 13:31 Go to previous message
Eclipse UserFriend
Originally posted by: terry.child.vixensoft.co.uk

Ah I get it!

I can use WM_PRINT to grab the layed out control images from an invisible
shell.

I even found some sample code here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=26095

I'll use GEF for adding handles as you suggested and that should be enough
for my small project.

Many thanks.

Terry Child


"Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
news:xTbWVu0aFHA.3996@fairy.ao.nlmk...
> Terry Child:
>
>> From looking at your web site it seems that you draw and layout
>> everything using your own code.
>
> No, we use layouts and controls that we see in source code.
>
>> How do handle custom widgets?
>
> We instantiate them.
>
>> You product is much more advanced than I need. I want to do something
>> much simpler and use the existing widgets and layout managers as much as
>> possible.
>
> Under Win32 you can use WM_PRINT message to get screenshot of SWT
> controls.
>
>> That's what I like about the BeanBox application - it lets you manipulate
>> actual live widgets.
>>
>> I guess what I need is some sort of transparent canvas - if that's even
>> possible with SWT?
>
> I think no.
>
>
>
>> "Konstantin Scheglov" <scheglov_ke@nlmk.ru> wrote in message
>> news:mbOocRyaFHA.2692@fairy.ao.nlmk...
>>
>>>Terry Child:
>>>
>>>
>>>>I know there are several SWT GUI designers - and I assume that they use
>>>>actual SWT widgets in 'design mode' so it must be possible to do
>>>>something like a glass pane in SWT.
>>>
>>> No, we show screenshots on widgets on design canvas and use GEF to show
>>> handles.
>>>
>>>--
>>>SY, Konstantin.
>>>Advanced Eclipse SWT Designer (http://www.swt-designer.com)
>>
>>
>>
>
>
> --
> SY, Konstantin.
> Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Previous Topic:[How to] SWT -> Listeners for MenuItem
Next Topic:Center dialog to application window
Goto Forum:
  


Current Time: Thu Mar 28 09:29:20 GMT 2024

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

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

Back to the top