Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Glass Pane equivalent of Swing in SWT ???
Glass Pane equivalent of Swing in SWT ??? [message #17885] Thu, 22 August 2002 21:22 Go to next message
Eclipse UserFriend
Originally posted by: sriksposh.hotmail.com

Hi

I'm looking for an 'Glass pane' (of swing) equivalent component in SWT.
If its not there...any suggestions to implement the below will be
appreciated.

here is what i'm trying to do....

I have two ViewForms on a Composite separated by a Sash.
I want to draw a line on top of these two components.
Lets say i have the starting coordinates (which fall in the region of left
viewform)
and the ending coordinates (which fall in the region of right viewform). how
would i connect these
two coordinates with a line.

Which components GC should i use ?

Any idea how to implement this in SWT???

Thanks

Srikanth
Re: Glass Pane equivalent of Swing in SWT ??? [message #17898 is a reply to message #17885] Fri, 23 August 2002 01:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

This is not supported in SWT. Even if they do expose such OS capabilities,
it isn't clear to me whether native widgets properly notify when they paint.
Sometimes a tree or some other native widget will erase your line, and you
won't be notified to repaint. And even when you are, there would be
flashing.

"Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
news:ak3l2q$25u$1@rogue.oti.com...
> Hi
>
> I'm looking for an 'Glass pane' (of swing) equivalent component in SWT.
> If its not there...any suggestions to implement the below will be
> appreciated.
>
> here is what i'm trying to do....
>
> I have two ViewForms on a Composite separated by a Sash.
> I want to draw a line on top of these two components.
> Lets say i have the starting coordinates (which fall in the region of left
> viewform)
> and the ending coordinates (which fall in the region of right viewform).
how
> would i connect these
> two coordinates with a line.
>
> Which components GC should i use ?
>
> Any idea how to implement this in SWT???
>
> Thanks
>
> Srikanth
>
>
Re: Glass Pane equivalent of Swing in SWT ??? [message #17947 is a reply to message #17898] Fri, 23 August 2002 17:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sriksposh.hotmail.com

May be we can have some work around here.
Let me know if this is feasible.

I was thinking if i could super impose a transperent canvas on top of my SWT
components,
and draw lines on this instead of my viewforms(thus mimic-ing the
functionality of a swing glass pane) .

Lets say the two ViewForms (separated by a sash) each contain a Tree.
And the user wants to drag and drop a node from source tree to the target
tree, and
my functionality is to show a line between those two nodes.

then i'll face these problems.

1. the click events on the canvas (which is big enough and of exact size of
the two ViewForms together) will have to be somehow propagated to the
underlying components.
2. Can i make a transperant canvas?
3. If any one of you are working on SWT apis, can you plz tell me how FAR or
NEAR are we to the SWT directly supporting these features.

Your comments plz.

Thanks.
Srikanth

"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak446v$8mf$1@rogue.oti.com...
> This is not supported in SWT. Even if they do expose such OS
capabilities,
> it isn't clear to me whether native widgets properly notify when they
paint.
> Sometimes a tree or some other native widget will erase your line, and you
> won't be notified to repaint. And even when you are, there would be
> flashing.
>
> "Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
> news:ak3l2q$25u$1@rogue.oti.com...
> > Hi
> >
> > I'm looking for an 'Glass pane' (of swing) equivalent component in SWT.
> > If its not there...any suggestions to implement the below will be
> > appreciated.
> >
> > here is what i'm trying to do....
> >
> > I have two ViewForms on a Composite separated by a Sash.
> > I want to draw a line on top of these two components.
> > Lets say i have the starting coordinates (which fall in the region of
left
> > viewform)
> > and the ending coordinates (which fall in the region of right viewform).
> how
> > would i connect these
> > two coordinates with a line.
> >
> > Which components GC should i use ?
> >
> > Any idea how to implement this in SWT???
> >
> > Thanks
> >
> > Srikanth
> >
> >
>
>
Re: Glass Pane equivalent of Swing in SWT ??? [message #17960 is a reply to message #17947] Fri, 23 August 2002 19:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

You cannot have a transparent canvas. You could try to mimic this by
hooking paint listeners on both trees, and painting over the Tree with a
line.


"Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
news:ak5sns$5v7$1@rogue.oti.com...
> May be we can have some work around here.
> Let me know if this is feasible.
>
> I was thinking if i could super impose a transperent canvas on top of my
SWT
> components,
> and draw lines on this instead of my viewforms(thus mimic-ing the
> functionality of a swing glass pane) .
>
> Lets say the two ViewForms (separated by a sash) each contain a Tree.
> And the user wants to drag and drop a node from source tree to the target
> tree, and
> my functionality is to show a line between those two nodes.
>
> then i'll face these problems.
>
> 1. the click events on the canvas (which is big enough and of exact size
of
> the two ViewForms together) will have to be somehow propagated to the
> underlying components.
> 2. Can i make a transperant canvas?
> 3. If any one of you are working on SWT apis, can you plz tell me how FAR
or
> NEAR are we to the SWT directly supporting these features.
>
> Your comments plz.
>
> Thanks.
> Srikanth
>
> "Randy Hudson" <hudsonr@spam.com> wrote in message
> news:ak446v$8mf$1@rogue.oti.com...
> > This is not supported in SWT. Even if they do expose such OS
> capabilities,
> > it isn't clear to me whether native widgets properly notify when they
> paint.
> > Sometimes a tree or some other native widget will erase your line, and
you
> > won't be notified to repaint. And even when you are, there would be
> > flashing.
> >
> > "Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
> > news:ak3l2q$25u$1@rogue.oti.com...
> > > Hi
> > >
> > > I'm looking for an 'Glass pane' (of swing) equivalent component in
SWT.
> > > If its not there...any suggestions to implement the below will be
> > > appreciated.
> > >
> > > here is what i'm trying to do....
> > >
> > > I have two ViewForms on a Composite separated by a Sash.
> > > I want to draw a line on top of these two components.
> > > Lets say i have the starting coordinates (which fall in the region of
> left
> > > viewform)
> > > and the ending coordinates (which fall in the region of right
viewform).
> > how
> > > would i connect these
> > > two coordinates with a line.
> > >
> > > Which components GC should i use ?
> > >
> > > Any idea how to implement this in SWT???
> > >
> > > Thanks
> > >
> > > Srikanth
> > >
> > >
> >
> >
>
>
Re: Glass Pane equivalent of Swing in SWT ??? - conclusion [message #17974 is a reply to message #17960] Fri, 23 August 2002 19:49 Go to previous message
Eclipse UserFriend
Originally posted by: sriksposh.hotmail.com

So finally to conclude this discussion.
We agreed its not possible in SWT, nor in the near future its likely to be
possible.

For the records .....I'm copying a piece of discussion which went out of the
forum here .....
************************************************************ ********
There is no support for transparent controls in SWT. In addition, you
cannot draw on top
of a control - "new GC (control)" will give a GC that is clipped to that
control. It will not draw
on the children. So, you can't get what you want with the API we have
right now.

There have been some DCR's requesting transparent panes in SWT. I suggest
you find
one and add yourself to the CC list. After 2.0.1 ships, we will be
evaluating functionality and
deciding which areas need work. Be warned, unfortunately Eclipse drives
SWT requirements
and it is unlikely that Eclipse (an IDE) will need a tranparent pane.

- Steve Northover <Steve_Northover@oti.com>
************************************************************ *********

Thank you Steve and Randy.
Srikanth


"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak608n$81c$1@rogue.oti.com...
> You cannot have a transparent canvas. You could try to mimic this by
> hooking paint listeners on both trees, and painting over the Tree with a
> line.
>
>
> "Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
> news:ak5sns$5v7$1@rogue.oti.com...
> > May be we can have some work around here.
> > Let me know if this is feasible.
> >
> > I was thinking if i could super impose a transperent canvas on top of my
> SWT
> > components,
> > and draw lines on this instead of my viewforms(thus mimic-ing the
> > functionality of a swing glass pane) .
> >
> > Lets say the two ViewForms (separated by a sash) each contain a Tree.
> > And the user wants to drag and drop a node from source tree to the
target
> > tree, and
> > my functionality is to show a line between those two nodes.
> >
> > then i'll face these problems.
> >
> > 1. the click events on the canvas (which is big enough and of exact size
> of
> > the two ViewForms together) will have to be somehow propagated to the
> > underlying components.
> > 2. Can i make a transperant canvas?
> > 3. If any one of you are working on SWT apis, can you plz tell me how
FAR
> or
> > NEAR are we to the SWT directly supporting these features.
> >
> > Your comments plz.
> >
> > Thanks.
> > Srikanth
> >
> > "Randy Hudson" <hudsonr@spam.com> wrote in message
> > news:ak446v$8mf$1@rogue.oti.com...
> > > This is not supported in SWT. Even if they do expose such OS
> > capabilities,
> > > it isn't clear to me whether native widgets properly notify when they
> > paint.
> > > Sometimes a tree or some other native widget will erase your line, and
> you
> > > won't be notified to repaint. And even when you are, there would be
> > > flashing.
> > >
> > > "Srikanth @ Eclipse" <sriksposh@hotmail.com> wrote in message
> > > news:ak3l2q$25u$1@rogue.oti.com...
> > > > Hi
> > > >
> > > > I'm looking for an 'Glass pane' (of swing) equivalent component in
> SWT.
> > > > If its not there...any suggestions to implement the below will be
> > > > appreciated.
> > > >
> > > > here is what i'm trying to do....
> > > >
> > > > I have two ViewForms on a Composite separated by a Sash.
> > > > I want to draw a line on top of these two components.
> > > > Lets say i have the starting coordinates (which fall in the region
of
> > left
> > > > viewform)
> > > > and the ending coordinates (which fall in the region of right
> viewform).
> > > how
> > > > would i connect these
> > > > two coordinates with a line.
> > > >
> > > > Which components GC should i use ?
> > > >
> > > > Any idea how to implement this in SWT???
> > > >
> > > > Thanks
> > > >
> > > > Srikanth
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Previous Topic:GEF in standalone application
Next Topic:populating commandstack
Goto Forum:
  


Current Time: Fri Jan 03 03:33:52 GMT 2025

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

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

Back to the top