|
Re: Using SWT controls as Figure? [message #47464 is a reply to message #47342] |
Wed, 04 December 2002 18:13 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.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.
3) targeting problems. GraphicalViewer is not designed to target EditParts
inside multiple controls
4) Print. You can't print a native Tree/Table
"Hal" <otaconss2@hotmail.com> wrote in message
news:asl8sk$dln$1@rogue.oti.com...
> 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 08:32 |
Alexandre Vermeerbergen Messages: 110 Registered: July 2009 |
Senior Member |
|
|
"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 17: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?
>
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03448 seconds