Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF for standard SWT
GEF for standard SWT [message #197197] Fri, 30 September 2005 03:48 Go to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
What would be involved from the GEF side to extend GEF to support an
arbitrary SWT Composite as a design surface?

I might need to do this for a client project I'm working on.


Best Regards,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: GEF for standard SWT [message #197224 is a reply to message #197197] Fri, 30 September 2005 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

"David J. Orme" <djo@coconut-palm-software.com> wrote in message
news:dhichl$rhb$1@news.eclipse.org...
> What would be involved from the GEF side to extend GEF to support an
> arbitrary SWT Composite as a design surface?
>
Create a FigureCanvas using the arbitrary SWT composite as the parent. ;-).
Would that work?
---
Sunil
Re: GEF for standard SWT [message #197239 is a reply to message #197197] Fri, 30 September 2005 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.obyrne.gmail.com

I have the same problem, I want to use GEF in a dialog, but I found no way
to use GEF without an Editor.

The only way I am thinking about would be to subclass the FigureCanvas and
add all the stuff present in the GraphicalViewerImpl class which extends
AbstractEditPartViewer and implements GraphicalViewer...

Pretty heavy stuff for me (I don't know GEF yet, I only know draw2D)


"David J. Orme" <djo@coconut-palm-software.com> wrote in message
news:dhichl$rhb$1@news.eclipse.org...
> What would be involved from the GEF side to extend GEF to support an
> arbitrary SWT Composite as a design surface?
>
> I might need to do this for a client project I'm working on.
>
>
> Best Regards,
>
> Dave Orme
> --
> Visual Editor Project lead
> http://www.db4o.com -- The Open-source Java Object Database
> http://xswt.sf.net -- XML-based SWT page description language
Re: GEF for standard SWT [message #197247 is a reply to message #197239] Fri, 30 September 2005 13:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: john.obyrne.gmail.com

I think I found a way:

Just use the ScrollingGraphicalViewer which seems to be done for that (it
takes a parent composite and instanciate a FigureCanvas)

"John O'Byrne" <john.obyrne@gmail.com> wrote in message
news:dhjetq$ah3$1@news.eclipse.org...
>I have the same problem, I want to use GEF in a dialog, but I found no way
>to use GEF without an Editor.
>
> The only way I am thinking about would be to subclass the FigureCanvas and
> add all the stuff present in the GraphicalViewerImpl class which extends
> AbstractEditPartViewer and implements GraphicalViewer...
>
> Pretty heavy stuff for me (I don't know GEF yet, I only know draw2D)
>
>
> "David J. Orme" <djo@coconut-palm-software.com> wrote in message
> news:dhichl$rhb$1@news.eclipse.org...
>> What would be involved from the GEF side to extend GEF to support an
>> arbitrary SWT Composite as a design surface?
>>
>> I might need to do this for a client project I'm working on.
>>
>>
>> Best Regards,
>>
>> Dave Orme
>> --
>> Visual Editor Project lead
>> http://www.db4o.com -- The Open-source Java Object Database
>> http://xswt.sf.net -- XML-based SWT page description language
>
>
Re: GEF for standard SWT [message #197254 is a reply to message #197224] Fri, 30 September 2005 15:01 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Sunil Kamath wrote:
> "David J. Orme" <djo@coconut-palm-software.com> wrote in message
> news:dhichl$rhb$1@news.eclipse.org...
>
>>What would be involved from the GEF side to extend GEF to support an
>>arbitrary SWT Composite as a design surface?
>>
>
> Create a FigureCanvas using the arbitrary SWT composite as the parent. ;-).
> Would that work?

I think that's one step.

Another is probably to create an SWTFigure object implementing IFigure
that wraps an arbitrary SWT Control class. This is because things like
GraphicalEditPart#createFigure() want to return an IFigure.

The IFigure wrapper would have to buffer any non-default SWT object
property values, create/dispose the actual SWT peer on add()/remove(),
and map between the Draw2d and SWT event models...

Otherwise you have to reinvent the whole GraphicalEditPart hierarchy for
SWT. Ugh.

Hmmmm.... Seems doable though. And you'd have to do 80% of this
anyway if you wanted to implement an SWT GUI builder based on direct
manipulation of SWT controls... (Thinking about this because someone
else several threads up was wondering how to do it, not because VE is
planning to do it any time soon... :-)


Regards,

Dave
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: GEF for standard SWT [message #197404 is a reply to message #197254] Mon, 03 October 2005 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

>>>What would be involved from the GEF side to extend GEF to support an
>>>arbitrary SWT Composite as a design surface?
>>>
>>
>> Create a FigureCanvas using the arbitrary SWT composite as the parent.
>> ;-).
>> Would that work?
>
> I think that's one step.

I think "design surface" was interpreted as the outer-most element.

> Another is probably to create an SWTFigure object implementing IFigure
> that wraps an arbitrary SWT Control class. This is because things like
> GraphicalEditPart#createFigure() want to return an IFigure.

Sure, lot's of people have asked for a figure that is a proxy to an SWT
Control. The lifecycle of the control would probably be managed outside of
the figure, such as by the editpart or something.

> The IFigure wrapper would have to buffer any non-default SWT object
> property values, create/dispose the actual SWT peer on add()/remove(), and
> map between the Draw2d and SWT event models...

Yuck. I don't think there is a generic way to extract the properties from a
Control when calling dispose. We would have to assume the control is around
the whole time.

Direct manipulation of heavyweight contrls would be too painful. You can't
paint on top of them, so there would be no handles or feedback.
Re: GEF for standard SWT [message #197419 is a reply to message #197404] Mon, 03 October 2005 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

"Randy Hudson" <none@us.ibm.com> wrote in message
news:dhrj48$r8p$1@news.eclipse.org...
> [snip] Direct manipulation of heavyweight contrls would be too painful.
> You can't paint on top of them, so there would be no handles or feedback.
And this, IMHO, is the deal-killer.

---
Sunil
Re: GEF for standard SWT [message #200229 is a reply to message #197419] Fri, 21 October 2005 04:57 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Sunil Kamath wrote:
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:dhrj48$r8p$1@news.eclipse.org...
>
>>[snip] Direct manipulation of heavyweight contrls would be too painful.
>>You can't paint on top of them, so there would be no handles or feedback.
>
> And this, IMHO, is the deal-killer.

There are ways to work around this. But I agree it isn't pretty.

(My GUI builder that pre-dated VE directly manipulated heavyweight
controls. But it's a moot point now that we have VE which uses GEF.)


Best,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Previous Topic:Palette and Tree View
Next Topic:SWT's FormLayout ported to Draw2d
Goto Forum:
  


Current Time: Tue Nov 12 19:15:34 GMT 2024

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

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

Back to the top