|
|
Re: GEF for standard SWT [message #197239 is a reply to message #197197] |
Fri, 30 September 2005 13:34 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #197404 is a reply to message #197254] |
Mon, 03 October 2005 15:35 |
Eclipse User |
|
|
|
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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04058 seconds