Composition of EditParts? [message #183637] |
Mon, 06 June 2005 04:53 |
Fabio Messages: 13 Registered: July 2009 |
Junior Member |
|
|
Hello.
I want to make an entity for my model that looks like this:
http://img.photobucket.com/albums/v495/_sl0t_/image.gif
This entity is composed by two sections. The top section is very similar
to an UML Class and the bottom section is an edition area where other
elements can be placed inside this entity.
Those two sections should have their own edit policies, so I made one
editpart for each one:
The top area's editpart is based from ClassEditPart, from eDiagram
example. Structural and behavioral features can be placed on this section.
The bottom area's editpart is based from LogicEditPart, from Logic
example. Others entities can be placed anywhere inside this section, like
the Circuit from Logic example.
But I need to treat both sections as the one entity they are. That means
they both have to be moved around together when I drag and drop one of
them, and I also wanna be able to resize one of them without affecting the
size of both sections (that means I may resize any of the two sections at
any time, but this operation must be restricted to the section I am
resizing, not both at same time).
The top section -must- be always attached to the top of the bottom
section, but it would be nice if I was able to "slide" it through the top
of the bottom section (maybe by drag and drop with mouse right button). I
don't know if this is possible and right now I would be glad if it was
just attached at the top left, so this can wait. :)
Is there any way to make this work? Maybe make a new edipart composed of
those two I already have or a new edipart that has different policies for
each section.
Thanks in advance.
Fábio Sobral.
|
|
|
|
Re: Composition of EditParts? [message #183677 is a reply to message #183646] |
Mon, 06 June 2005 14:32 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
I forgot we had an example of this. Basically, each section of children is
managed by a "bogus" non-selectable editpart to serve as the container for
that type of structural feature. Once you start implementing everything
you'll see that it really is a fine solution.
"Ed Willink" <ed@willink.me.uk> wrote in message
news:d80ncg$h9l$1@news.eclipse.org...
> Hi F
|
|
|
|
Powered by
FUDForum. Page generated in 0.05670 seconds