Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » [GMFgraph] Compartments
[GMFgraph] Compartments [message #713894] Tue, 09 August 2011 10:22 Go to next message
nicolas h is currently offline nicolas hFriend
Messages: 60
Registered: February 2011
Location: Grenoble, France
Member
Hi there,
I have an object "A" which contains a compartment, and an object "B" which is located inside the compartment.

I wish object "B"'s size was 100% of the compartment's size. Is there a way to do this in the gmfgraph model please ?

Thank you,

Regards,

--
Nicolas
Re: [GMFgraph] Compartments [message #713901 is a reply to message #713894] Tue, 09 August 2011 10:39 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Have you tried to use a GridLayout on A with numColunns=1, and a
GridLayoutData on B using FILL and setting grabs to true?

HTH

--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: [GMFgraph] Compartments [message #713929 is a reply to message #713901] Tue, 09 August 2011 12:17 Go to previous message
nicolas h is currently offline nicolas hFriend
Messages: 60
Registered: February 2011
Location: Grenoble, France
Member
Hi Mickael. I tried your advice, but it did not work. B did not take 100% of the compartment's size, and B was not resized when A was. B keep the same size.

  <figures
      name="Default">
    <descriptors
        name="AFigure">
      <actualFigure
          xsi:type="gmfgraph:Rectangle"
          name="AFigure">
        <layout
            xsi:type="gmfgraph:GridLayout"/>
        <children
            xsi:type="gmfgraph:Label"
            name="ANameFigure"
            text="&lt;...>"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.0/@actualFigure/@children.0"/>
    </descriptors>
    <descriptors
        name="BFigure">
      <actualFigure
          xsi:type="gmfgraph:RoundedRectangle"
          name="BFigure">
        <layoutData
            xsi:type="gmfgraph:GridLayoutData"
            grabExcessHorizontalSpace="true"
            grabExcessVerticalSpace="true"
            verticalAlignment="FILL"
            horizontalAlignment="FILL"/>
        <backgroundColor
            xsi:type="gmfgraph:RGBColor"
            green="50"
            blue="100"/>
      </actualFigure>
    </descriptors>
  <nodes
      name="A"
      figure="AFigure"/>
  <nodes
      name="B"
      figure="BFigure"
      resizeConstraint="NONE"/>
  <compartments
      name="BCompartment"
      figure="AFigure"
      collapsible="true"/>
</gmfgraph:Canvas>
Previous Topic:why the icon is diffrent?
Next Topic:Validation in gmf
Goto Forum:
  


Current Time: Tue Apr 16 15:31:54 GMT 2024

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

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

Back to the top