[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: Group or dock Figure/Editparts
|
The rule of thumb is to think from the model point of view, not from the
editor UI POV.
I.e. in case you have docking you should reflect this in your model (i.e.
when one model position changes, change the position of the second model)
and then propagate it to the editor.
From the GEF point of view, if you want to implement docking it seems like
you can toggle dock state in response to Add/Orphan requests (i.e. when you
drag objectA on top of objectB, objetB editpart will receive the add request
so you can change the feedback painting and update the docked state of the
model)
Eugene
"Carsten" <carroe@xxxxxxx> wrote in message
news:cohc0g$6b1$1@xxxxxxxxxxxxxxxxxx
> Hi,
>
> i want to dock (group) two Figures/Editparts, so that:
> * their models get connected somehow
> * their contraints (size/position) are changend synchronous
> (proportional/by difference)
>
> There is no such parent<>child relationship between the model elements
> as with 'AbstractEditPart.getModelChildren()'. They are more or less
> considered to be on a equal level, so it would be more like
> <EditPart>.getDockedElements().
>
> Where would be the best starting point for the dockable/docking part?
> Specialize AbstractGraphicalEditPart? Or even deeper?
>
> Any suggestions?
>
> Tnx.
> Carsten