Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Container shape inside another container shape
Container shape inside another container shape [message #1064492] Wed, 19 June 2013 13:43 Go to next message
Vladimir D is currently offline Vladimir DFriend
Messages: 22
Registered: January 2013
Junior Member
Hi all,

I have the following problem:

lets suppose that a have created an element (by choosing a tool from palette) on the diagram. That element should contain two different child container shapes, lets call them left and right container shape, and they must be programmatically created. Also they must be linked to different business objects. Next thing is that i want to add some other element (by choosing a tool from palette) inside left or right CS and I must know in which one I've added it in order to make this new object a child of right business object.

So my question is: Is there any easy way of doing this? (I've added a picture as an attachment to show you how this should look like).

I've done this by adding new container shapes inside the add method of parent shape (the first one that is added to diagram). There, I have also created new BOs and linked them to those picture elements (which I don't like because I shouldn't mix those two in the same method).

But some problems arise from this approach: when I now try to add new element (from pallete, to left or right CS), target container is always the parent, not the left and right CS. Even when i add the element to appropriate CS (through some foreach loops and a lot of if statements Sad ) i end up with a picture element that is not refreshing properly.

Any thoughts on those problems if there is no easier solution?

Thanks.
  • Attachment: lrelement.JPG
    (Size: 20.63KB, Downloaded 206 times)
Re: Container shape inside another container shape [message #1064602 is a reply to message #1064492] Thu, 20 June 2013 08:12 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Vladimir,

could it be that your left and right container shapes are inactive?

Michael
Re: Container shape inside another container shape [message #1064628 is a reply to message #1064602] Thu, 20 June 2013 09:57 Go to previous messageGo to next message
Vladimir D is currently offline Vladimir DFriend
Messages: 22
Registered: January 2013
Junior Member
Michael,

thank you very much. That solved a lot of my problems.

The problem that remains now, is how to disable all operations on those left and right panels (deletion, movement, resizing, etc)? I want them do delete only when I delete their parent shape... Also if I add a text shape to those LR CS parent, parent only sees those text shapes as a children, but not the container shape itself. This is a problem to me as I want to properly do the layouting.

Best regards,
Vladimir
Re: Container shape inside another container shape [message #1064806 is a reply to message #1064628] Fri, 21 June 2013 07:51 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Vladimir,

that is best done by disabling the delete, move etc. features for those
shapes in the feature provider. Probably the easiest way would be to return
a delete feature only for the out container shape (the one that is linked
with your outer domain object) and return null for all other shapes.

Michael
Re: Container shape inside another container shape [message #1065075 is a reply to message #1064806] Mon, 24 June 2013 08:55 Go to previous message
Vladimir D is currently offline Vladimir DFriend
Messages: 22
Registered: January 2013
Junior Member
Michael,

thank you. This solved the problems that i had.

Vladimir
Previous Topic:Archive Updatesite 0.8.2 causes Fatal Errors
Next Topic:Line color for shapes
Goto Forum:
  


Current Time: Thu Apr 18 20:02:45 GMT 2024

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

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

Back to the top