Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Composite edit parts and figure hierarchy
Composite edit parts and figure hierarchy [message #205007] Fri, 09 December 2005 18:36 Go to next message
Eclipse UserFriend
Originally posted by: tfrangoullides.instream.co.uk

--nextPart4254124.unrgmpVy2M
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

I've been having a problem with the way my figures and edit parts are
organised on a particular GEF editor for sometime. I think I'm missing some
key concepts and I would really appreciate some help from those who
understand the GEF architecture better than myself.

I've attached a screen shot from my current (RAD)editor to help describe the
problem. Notice the large grey "roles", they are containers for the smaller
linked "action" boxes. Notice also that labels for the role and for the
little boxes appear outside the items and also the containing box. This is
important for this notation. You'll also notice that the selected role has
handles drawn only around the relevant resizable area and doesn't include
the label, this also happens for the little action boxes.

I achieved this by having each labeled edit part create an "additional"
figure and adding it to a special labels layer in an overriden
registerVisuals method. It also adds a locator for the move together.
However, I really want the label figures to be controlled by their own edit
parts so I can start to add extra capabilites like dragging them around (I
can give them their own notational element in the model).

I think I want to make the label edit part a child of the box edit part but
then I can't find a good way to move the figure to its own layer.
Overriding addChildVisual to do this created IndexOutOfBounds problems.

I'm thinking about an invisible composite edit part which owns box figure
and label edit parts but my requests and not passing through to the child
parts... besides I am not sure this will allow the little action box labels
to overlap the container boundaries.

many thanks,

Tas.



--nextPart4254124.unrgmpVy2M
Content-Type: image/gif; name="rad.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="rad.gif"

R0lGODlhHALRAefrAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoK CgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4e Hh8fHyAgICIiIiQk
JCUlJSYmJicnJygoKCkpKSoqKiwsLC0tLS4uLjAwMDExMTIyMjQ0NDU1NTY2 Njc3Nzg4ODk5OTo6
Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJ SUpKSkxMTE1NTU5O
Tk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWlxcXF1dXV5e XmFhYWJiYmNjY2Rk
ZGVlZWdnZ2hoaGpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1 dXZ2dnd3d3h4eHl5
eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKCgoODg4SEhIWFhYaGhoeHh4mJ iYqKio2NjY6Ojo+P
j5GRkZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm52dnZ6enp+fn6Cg oKGhoaKioqOjo6Sk
pKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOz s7S0tLW1tba2tre3
t7m5ubq6uru7u7y8vL29vb6+vsDAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jI yMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb 29zc3N3d3d7e3t/f
3+Dg4OHh4ePj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v 7/Dw8PHx8fLy8vPz
8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v////////////// ////////////////
/////////////////////////////////////////////////////yH+FUNy ZWF0ZWQgd2l0aCBU
aGUgR0lNUAAsAAAAABwC0QEACP4AtQkcSLCgwYMIEypcyLChw4cQI0qcSLGi xYsYM2rcyLGjx48g
Q4ocSbKkyZMoU6pcybKly5cwY8qcSbOmzZs4c+rcybOnz59AgwodSrSo0aNI kypdyrSp06dQo0qd
SrWq1atYs2rdyrWr169gw4odS7as2bNo06pdy7at27dw48qdS7eu3Y/r8urd y7ev37+AAwseTLiw
4bx3Vx5ezLix48eCEzuETLmy5cuIJaPEzLmz57+aGX4eTfpy6JOlU6tefFrh 6t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rfV4Hl1hILNl1lLbdl+Hna5ir3dY2sn2Qx6dkmtnG1GD5vbuDX2 t0EdbXGHpdmULDey
yb3qn/5VmzrXPlC6dwRvCcn73ev+tZDt7Rx672ffz+k3ef5tnIC/Z+BLObem 3M1vfE9bvQcPT8PF
G+5aP8rb7JbZwqsjcY4VXDoQxy/HVeZx3mic4CIHcJZN/huSZxDjJFt5xC+e 721XvCMtxw7IP0Rx
m+tm5g53sc7bg3IEq1zoq8G5Ml/+sJiH/OcTp/bR0Ux0CBu95z7vtdRTmnT+ aD0/VMew1a8+KrDr
WOxjd9XTO352tOdK7SNne9uJ9faU81zuyCk7kuN+97/k3btcR5LXC+R3/gIe NU2PjeGHI/j/7P3u
ipfO0ifGeMsQnsCQBw3ih073otud79jifNU9/3nMw/5H8gyjPIRCH/bR8730 tUl9U14vGc0j3fIM
nn2DYu+X3CPp9PSq/dRXb/bWP/72FO69gHa/oeHrvfhyT76UaM7l5TP7+EqK vmCC35nsZ/738ao+
XbqfmfCPavx42f7Xm/93x0P/+l86P4vKf7332zj+cEn/4Ndf+Pa3/f6Kmb9E 6Tv1+ovPw7tbC0AB
/L/FKEADRJWs2xfQQzFnccC5a7QEFEAJtDJUqUALVLlhMZsBpA2zMb0Q7EAR pLZmWQecsaKEw4kV
vJl18A6WgMGHsKITdMFAyb+YqEEAuMG/uK4gFMIhJMIg7MEeLMIkVMIlnIgj PMFOWcIolMIppMIq
tHjCnNmaI7zCLaRCLeTCL1RCJ3zCMeQ7MfQPM8QPNCTDNew5EzzDskkQN2TD OaTDOrTDO8TDPNTD
PeTDPvTDPwTEQBTEQSTEQjTEQ0TERFTERWTERnTER4TESJTESaTESrTES8TE TNTETeTETvTETwTF
UBTFUeyMgAAAOw==
--nextPart4254124.unrgmpVy2M--
Re: Composite edit parts and figure hierarchy [message #205067 is a reply to message #205007] Sun, 11 December 2005 21:05 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
I solved that problem with an LabelModel, LabelModelEditPart and the
LabelFigure.

I create the LabelModel on demand for each AnyElementModel element

The LabelModel is NOT a child of AnyElementModel.

The LabelModel is a listener of movements of the *virtual* parent (AnyElementModel)

The LabelModel is the last one in the ParentOfAllModel.getChildren() List
So - the LabelModel is always on top of all elements.

Advantage:
- I can move the Label with DragDrop relative to its *virtual* parent.
- The label model is a listener to the *virtual* parent and can adjust it position.
on the model level.
- No additional layer required.


ParentOfAllModel
|
|--AnyElementModel[1]
|
|--AnyElementModel[2]
|
|--Comment[1]
|
|--Comment[2]
|
|--Comment[3]
.
.
Re: Composite edit parts and figure hierarchy [message #205099 is a reply to message #205067] Mon, 12 December 2005 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tfrangoullides.instream.co.uk

Thanks for sharing this with me. I was hoping to have the label as a child
of the labeled element and just have different edit part hierarchy but if I
can't find a way to do that then I will try your approach. How are you
keeping labels at the end of the children collection? Has this complicated
the adding of non-label model elements?

As a general rule, does the edit part hierarchy have to reflect the model
hierarchy?

Thanks again,

Tas.

FreeGroup wrote:

> I solved that problem with an LabelModel, LabelModelEditPart and the
> LabelFigure.
>
> I create the LabelModel on demand for each AnyElementModel element
>
> The LabelModel is NOT a child of AnyElementModel.
>
> The LabelModel is a listener of movements of the *virtual* parent
> (AnyElementModel)
>
> The LabelModel is the last one in the ParentOfAllModel.getChildren() List
> So - the LabelModel is always on top of all elements.
>
> Advantage:
> - I can move the Label with DragDrop relative to its *virtual* parent.
> - The label model is a listener to the *virtual* parent and can adjust
> it position.
> on the model level.
> - No additional layer required.
>
>
> ParentOfAllModel
> |
> |--AnyElementModel[1]
> |
> |--AnyElementModel[2]
> |
> |--Comment[1]
> |
> |--Comment[2]
> |
> |--Comment[3]
> .
> .
Re: Composite edit parts and figure hierarchy [message #205236 is a reply to message #205099] Wed, 14 December 2005 08:12 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Tas Frangoullides wrote:
> Thanks for sharing this with me. I was hoping to have the label as a child
> of the labeled element and just have different edit part hierarchy but if I
> can't find a way to do that then I will try your approach. How are you
> keeping labels at the end of the children collection? Has this complicated
> the adding of non-label model elements?

adding Labels with myElementList.add(myLabel);
and non labels with myElementList.add(0,anyElement);

>
> As a general rule, does the edit part hierarchy have to reflect the model
> hierarchy?
>
I think it is the typical case.
But I made a GUI designer (yet another) and if I move
e.g. a TextField I want move a corresponding Label of them.
But I want move the Label separate as well (e.g. at the top, left, right
or at any place in the ui (outside of its parent)).

So the Label is a child of the TextField but not a child
of the TextFieldEditPart.

And if I move the TextFieldModel I update the LabelModel
with the moveDiff of the TextFieldModel.

The Label has now always the same relative postion to its
TextFieldModel.

> Thanks again,
>
> Tas.
>
> FreeGroup wrote:
>
>
>
>
Re: Composite edit parts and figure hierarchy [message #205409 is a reply to message #205236] Fri, 16 December 2005 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tfrangoullides.instream.co.uk

After much playing and going round in circles I have found that changing the
parent-child relationships of my model and editparts difficult to work
with. Is there a way to have the figure of an editpart appear in a figure
other than that of its parent. A connection edit achieves this using
registerVisuals so it can add the figure to a different layer. Can a
similar thing be achieved from a child node edit part?

Thanks for your help,

Tas.


FreeGroup wrote:

> Tas Frangoullides wrote:
>> Thanks for sharing this with me. I was hoping to have the label as a
>> child of the labeled element and just have different edit part hierarchy
>> but if I can't find a way to do that then I will try your approach. How
>> are you keeping labels at the end of the children collection? Has this
>> complicated the adding of non-label model elements?
>
> adding Labels with myElementList.add(myLabel);
> and non labels with myElementList.add(0,anyElement);
>
>>
>> As a general rule, does the edit part hierarchy have to reflect the model
>> hierarchy?
>>
> I think it is the typical case.
> But I made a GUI designer (yet another) and if I move
> e.g. a TextField I want move a corresponding Label of them.
> But I want move the Label separate as well (e.g. at the top, left, right
> or at any place in the ui (outside of its parent)).
>
> So the Label is a child of the TextField but not a child
> of the TextFieldEditPart.
>
> And if I move the TextFieldModel I update the LabelModel
> with the moveDiff of the TextFieldModel.
>
> The Label has now always the same relative postion to its
> TextFieldModel.
>
>> Thanks again,
>>
>> Tas.
>>
>> FreeGroup wrote:
>>
>>
>>
>>
Re: Composite edit parts and figure hierarchy [message #205417 is a reply to message #205409] Fri, 16 December 2005 12:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tfrangoullides.instream.co.uk

Sorry... it is activateFigure (not registerVIsuals) which achieves this for
connection edit parts. This is not available for GraphicalEditParts :(

>
> After much playing and going round in circles I have found that changing
> the parent-child relationships of my model and editparts difficult to work
> with. Is there a way to have the figure of an editpart appear in a figure
> other than that of its parent. A connection edit achieves this using
> registerVisuals so it can add the figure to a different layer. Can a
> similar thing be achieved from a child node edit part?
>
> Thanks for your help,
>

> Tas.
>
>
> FreeGroup wrote:
>
>> Tas Frangoullides wrote:
>>> Thanks for sharing this with me. I was hoping to have the label as a
>>> child of the labeled element and just have different edit part hierarchy
>>> but if I can't find a way to do that then I will try your approach. How
>>> are you keeping labels at the end of the children collection? Has this
>>> complicated the adding of non-label model elements?
>>
>> adding Labels with myElementList.add(myLabel);
>> and non labels with myElementList.add(0,anyElement);
>>
>>>
>>> As a general rule, does the edit part hierarchy have to reflect the
>>> model hierarchy?
>>>
>> I think it is the typical case.
>> But I made a GUI designer (yet another) and if I move
>> e.g. a TextField I want move a corresponding Label of them.
>> But I want move the Label separate as well (e.g. at the top, left, right
>> or at any place in the ui (outside of its parent)).
>>
>> So the Label is a child of the TextField but not a child
>> of the TextFieldEditPart.
>>
>> And if I move the TextFieldModel I update the LabelModel
>> with the moveDiff of the TextFieldModel.
>>
>> The Label has now always the same relative postion to its
>> TextFieldModel.
>>
>>> Thanks again,
>>>
>>> Tas.
>>>
>>> FreeGroup wrote:
>>>
>>>
>>>
>>>
Re: Composite edit parts and figure hierarchy [message #209021 is a reply to message #205099] Fri, 10 February 2006 12:59 Go to previous message
Eclipse UserFriend
Originally posted by: renato.sysmap.com.br

Hi,

I'm facing the same problem and would appreciate if you guys could give
me more detailed explanation about this solution.

Thanks in advance,
Renato.

Tas Frangoullides wrote:
> Thanks for sharing this with me. I was hoping to have the label as a child
> of the labeled element and just have different edit part hierarchy but if I
> can't find a way to do that then I will try your approach. How are you
> keeping labels at the end of the children collection? Has this complicated
> the adding of non-label model elements?
>
> As a general rule, does the edit part hierarchy have to reflect the model
> hierarchy?
>
> Thanks again,
>
> Tas.
>
> FreeGroup wrote:
>
>
>>I solved that problem with an LabelModel, LabelModelEditPart and the
>>LabelFigure.
>>
>>I create the LabelModel on demand for each AnyElementModel element
>>
>>The LabelModel is NOT a child of AnyElementModel.
>>
>>The LabelModel is a listener of movements of the *virtual* parent
>>(AnyElementModel)
>>
>>The LabelModel is the last one in the ParentOfAllModel.getChildren() List
>>So - the LabelModel is always on top of all elements.
>>
>>Advantage:
>> - I can move the Label with DragDrop relative to its *virtual* parent.
>> - The label model is a listener to the *virtual* parent and can adjust
>> it position.
>> on the model level.
>> - No additional layer required.
>>
>>
>>ParentOfAllModel
>> |
>> |--AnyElementModel[1]
>> |
>> |--AnyElementModel[2]
>> |
>> |--Comment[1]
>> |
>> |--Comment[2]
>> |
>> |--Comment[3]
>> .
>> .
>
>
Previous Topic:DirectEdit and GroupRequest
Next Topic:Painting a figure of a connection
Goto Forum:
  


Current Time: Thu Apr 25 13:03:11 GMT 2024

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

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

Back to the top