Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Placing a container in a composite figure
Placing a container in a composite figure [message #215148] Tue, 13 January 2009 18:29 Go to next message
Marc Ollier is currently offline Marc OllierFriend
Messages: 8
Registered: July 2009
Junior Member
Hello

I have a rectangle A that contains two rectangles B and C. How can I place a
container into B? The property Compartment.Figure does only accept Figure
Descriptors, but A B and C are all under the same Figure Descriptor.

Declaring a Child Access for B and referencing this child access in the
compartment instead of referencing the figure descriptor does not work
neither.

Has someone an idea?

Thanks
Marc
Re: Placing a container in a composite figure [message #215179 is a reply to message #215148] Wed, 14 January 2009 13:06 Go to previous messageGo to next message
Marc Ollier is currently offline Marc OllierFriend
Messages: 8
Registered: July 2009
Junior Member
Hello again

I have found this thread in the archive:
http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03541.html

This post (from 2006) suggests using following gmfgraph xml:

<children
xsi:type="gmfgraph:Rectangle"
referencingElements="ThreadCompartment"
name="FolderCompartment">
<layoutData
xsi:type="gmfgraph:BorderLayoutData"
alignment="FILL"/>
</children>

<compartments
name="ThreadCompartment"
figure="FolderCompartment"
collapsible="true"
needsTitle="true"/>

Is this from an older version of GMF? The attribute referencingElements
semms not to exist, and I am not able to select a rectangle as figure
compartment.
How can the same result be reached with the current GMF?

Thanks
Marc


"Marc Ollier" <in1@marc-ollier.com> schrieb im Newsbeitrag
news:gkimid$e6g$1@build.eclipse.org...
> Hello
>
> I have a rectangle A that contains two rectangles B and C. How can I place
> a container into B? The property Compartment.Figure does only accept
> Figure Descriptors, but A B and C are all under the same Figure
> Descriptor.
>
> Declaring a Child Access for B and referencing this child access in the
> compartment instead of referencing the figure descriptor does not work
> neither.
>
> Has someone an idea?
>
> Thanks
> Marc
Re: Placing a container in a composite figure [message #215522 is a reply to message #215148] Fri, 16 January 2009 15:31 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marc,

The trick is: you have to define node figure and compartment figure separately
- GMF will include second one into the first one automatically. If you have
a complex structure of Node figure (having dedicated child figure where compartment
figure should be placed) then you have to point to this figure (child container)
by contentPane property of Node referencing main node FigureDescriptor (contentPane
property should point to the appropriate childAccess created below main FigureDescriptor
and pointing to the childFigure).

-----------------
Alex Shatalin
Previous Topic:Doubt regarding child nodes inside a compartment
Next Topic:Synchronization problem
Goto Forum:
  


Current Time: Fri Apr 26 21:06:12 GMT 2024

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

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

Back to the top