Using SWT controls as Figure? [message #47342] |
Wed, 04 December 2002 11:04  |
Eclipse User |
|
|
|
Hi,
In GEF, is it possible to use SWT controls (e.g. a Tree or a Table) as the
Figure (View of the MVC) in the GEF?
I check the code, SWT controls are not inherit from IFigure. So do I need
to write some kind of adapter or it is not possible by design?
Thank you.
|
|
|
|
Re: Using SWT controls as Figure? [message #47494 is a reply to message #47464] |
Thu, 05 December 2002 03:32   |
Eclipse User |
|
|
|
"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aslggl$j4s$1@rogue.oti.com...
> You could write a proxy figure that positions an SWT control to match its
> bounds.
>
> There will be some issues:
> 1) Cannot paint on top of another SWT control, so no handles, feedback,
> connections, etc.
> 2) Focus problems. You would probably have to set the SWT control to be
not
> active, so it doesn't steal mouse events.
But what if he needs to have a SWT widget to edit some data? something like
a textfield or table cell editor?
The SWT widget should have its mouse & keyboard events redirected...
Yet I understand that draw2d and SWT have radically different
implementations: draw2d is based on painting pixels on a canvas, so all
pre-defined figures and even pseudo-widget like ScrollPane or Label are
emulated like in Java Swing ; whereas SWT is a thin Java wrapping of native
(Mac, Motif, Windows, etc.) widgets and that involves constraints like no
overlapping widgets.
But since I can read in this newsgroup that I am not the first to need
emulated SWT widgets in draw2d, shouldn't we consider as a possible
GEF/draw2d evolution request to implement draw2d equivalent for: List, Tree,
Textfield (maybe we have something like that with label, from what I see in
Logical Diagram Editor), combo, table/tree editor, etc. with a decent focus
& selection management (I have somehow hard time to manage
selection/deselection of items is several emulated draw2d lists....
currently ;-)
Any vote here?
|
|
|
Re: Using SWT controls as Figure? [message #47796 is a reply to message #47494] |
Thu, 05 December 2002 12:12   |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:aslggl$j4s$1@rogue.oti.com...
> > You could write a proxy figure that positions an SWT control to match
its
> > bounds.
> >
> > There will be some issues:
> > 1) Cannot paint on top of another SWT control, so no handles, feedback,
> > connections, etc.
> > 2) Focus problems. You would probably have to set the SWT control to be
> not
> > active, so it doesn't steal mouse events.
>
> But what if he needs to have a SWT widget to edit some data? something
like
> a textfield or table cell editor?
CellEditors are supported. Have you double-clicked on a Logic Label?
> The SWT widget should have its mouse & keyboard events redirected...
>
> Yet I understand that draw2d and SWT have radically different
> implementations: draw2d is based on painting pixels on a canvas, so all
> pre-defined figures and even pseudo-widget like ScrollPane or Label are
> emulated like in Java Swing ; whereas SWT is a thin Java wrapping of
native
> (Mac, Motif, Windows, etc.) widgets and that involves constraints like no
> overlapping widgets.
>
> But since I can read in this newsgroup that I am not the first to need
> emulated SWT widgets in draw2d, shouldn't we consider as a possible
> GEF/draw2d evolution request to implement draw2d equivalent for: List,
Tree,
> Textfield (maybe we have something like that with label, from what I see
in
> Logical Diagram Editor), combo, table/tree editor, etc. with a decent
focus
> & selection management (I have somehow hard time to manage
> selection/deselection of items is several emulated draw2d lists....
> currently ;-)
> Any vote here?
>
>
>
>
>
|
|
|
Re: Using SWT controls as Figure? [message #48248 is a reply to message #47796] |
Fri, 06 December 2002 06:38  |
Eclipse User |
|
|
|
"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aso1b1$ne$1@rogue.oti.com...
> CellEditors are supported. Have you double-clicked on a Logic Label?
Is that something that works only in GEF "2", or is it possible to do it
with the GEF "1" that comes with WebSphere Workbench 1.0?
I am still living in the deployed world of WSAD 4.x :(
Hopefully I found that GEF 1 can be installed in Eclipse 2.1 M3 so that
development with latest 2.1 gadgets (I like very much hyperlinking of Java
code) is possible!
|
|
|
Powered by
FUDForum. Page generated in 0.07141 seconds