Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d and SWT working together
Draw2d and SWT working together [message #181487] Mon, 16 May 2005 16:54 Go to next message
Eclipse UserFriend
Originally posted by: andrew_NOSPAM_.eisenberg.as

Hi,

Is there a way to place an SWT widget onto a draw2d figure? In particular, I
would like to place an (editable) text field onto part of a draw2d drawing.


thanks,
--andrew
Re: Draw2d and SWT working together [message #181613 is a reply to message #181487] Wed, 18 May 2005 02:51 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You can't add an SWT widget to a figure, but you can place it over where you
know the draw2d figure is. We do this for direct-editing. In the logic
example, select a label and then click on it (but not so soon that it's a
double-click). This will trigger direct-edit and an SWT celleditor will pop
up. Look at DirectEditManager et al to see how this was done.

"Andrew Eisenberg" <andrew_NOSPAM_@eisenberg.as> wrote in message
news:d6ajr2$brv$1@news.eclipse.org...
> Hi,
>
> Is there a way to place an SWT widget onto a draw2d figure? In
> particular, I would like to place an (editable) text field onto part of a
> draw2d drawing.
>
>
> thanks,
> --andrew
Re: Draw2d and SWT working together [message #181647 is a reply to message #181613] Wed, 18 May 2005 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrew_NOSPAM_.eisenberg.as

Very cool. Thanks!

Pratik Shah wrote:
> You can't add an SWT widget to a figure, but you can place it over where you
> know the draw2d figure is. We do this for direct-editing. In the logic
> example, select a label and then click on it (but not so soon that it's a
> double-click). This will trigger direct-edit and an SWT celleditor will pop
> up. Look at DirectEditManager et al to see how this was done.
>
> "Andrew Eisenberg" <andrew_NOSPAM_@eisenberg.as> wrote in message
> news:d6ajr2$brv$1@news.eclipse.org...
>
>>Hi,
>>
>>Is there a way to place an SWT widget onto a draw2d figure? In
>>particular, I would like to place an (editable) text field onto part of a
>>draw2d drawing.
>>
>>
>>thanks,
>>--andrew
Re: Draw2d and SWT working together [message #181802 is a reply to message #181487] Thu, 19 May 2005 15:40 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Someone should contribute a ControlProxy figure implementation to draw2d.
(I think we'd be using proxy in the right sense in thise case, but correct
me if I'm wrong). the figure's getPreferredSize(), would delegate to the
computeSize method on the control. Calling setBounds on the figure would
additionally call setBounds() on the Control (after translating to absolute
cooreidnates). Disposing the control would remove the figure from it's
parent.

There are still some other bugs surrounding scrolling of the canvas and
children not moving. Those will be fixed soon I hope.

"Andrew Eisenberg" <andrew_NOSPAM_@eisenberg.as> wrote in message
news:d6ajr2$brv$1@news.eclipse.org...
> Hi,
>
> Is there a way to place an SWT widget onto a draw2d figure? In
> particular, I would like to place an (editable) text field onto part of a
> draw2d drawing.
>
>
> thanks,
> --andrew
Previous Topic:NPE with ToolUtilities
Next Topic:keyboard navigation across containers
Goto Forum:
  


Current Time: Tue Sep 24 23:03:34 GMT 2024

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

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

Back to the top