Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » About the layout of Compartment
About the layout of Compartment [message #203602] Thu, 28 August 2008 09:48 Go to next message
Eclipse UserFriend
Originally posted by: stephenbyc.gmail.com

Hi,
Now I want to make the compartment fill the parent. Which layout I can
use to implement it? And how to set the property?

Thanks,

Stephen
Re: About the layout of Compartment [message #203646 is a reply to message #203602] Thu, 28 August 2008 11:10 Go to previous messageGo to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Stephen wrote:
> Hi,
> Now I want to make the compartment fill the parent. Which layout I can
> use to implement it? And how to set the property?

From my experience the solution depends on GMF version you use, so
which GMF version you use?

--
Greetings,
Seweryn
Re: About the layout of Compartment [message #203779 is a reply to message #203646] Fri, 29 August 2008 01:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stephenbyc.gmail.com

Seweryn Niemiec wrote:
> Stephen wrote:
>> Hi,
>> Now I want to make the compartment fill the parent. Which layout I can
>> use to implement it? And how to set the property?
>
> From my experience the solution depends on GMF version you use, so
> which GMF version you use?
>

Hi,
I am using GMF2.1.

Thanks,

Stephen
Re: About the layout of Compartment [message #203849 is a reply to message #203779] Fri, 29 August 2008 12:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thugcee.gmail.com

Stephen pisze:
> Seweryn Niemiec wrote:
>> Stephen wrote:
>>> Hi,
>>> Now I want to make the compartment fill the parent. Which layout I
>>> can use to implement it? And how to set the property?
>>
>> From my experience the solution depends on GMF version you use, so
>> which GMF version you use?
>>
>
> Hi,
> I am using GMF2.1.
>
> Thanks,
>
> Stephen

Try something like this:

<descriptors
name="ContainerDescriptor">
<actualFigure
xsi:type="gmfgraph:Rectangle"
name="ContainerFigure">
<layout
xsi:type="gmfgraph:GridLayout">
<margins/>
<spacing/>
</layout>
<children
xsi:type="gmfgraph:Label"
name="BasicLabelFigure"
text="&lt;...>">
<layoutData
xsi:type="gmfgraph:GridLayoutData"
grabExcessHorizontalSpace="true"
verticalAlignment="BEGINNING"
horizontalAlignment="FILL"/>
</children>
<children
xsi:type="gmfgraph:Rectangle"
name="CompartmentFigure"
outline="false"
fill="false">
<layoutData
xsi:type="gmfgraph:GridLayoutData"
grabExcessHorizontalSpace="true"
grabExcessVerticalSpace="true"
verticalAlignment="FILL"
horizontalAlignment="FILL"/>
</children>
</actualFigure>
<accessors
figure="//@figures.0/@descriptors.3/@actualFigure/@children.0 "/>
<accessors
figure="//@figures.0/@descriptors.3/@actualFigure/@children.1 "/>
</descriptors>

It works for me _almost_ without any problems :)

Greetings,
Seweryn Niemiec
Re: About the layout of Compartment [message #203958 is a reply to message #203849] Mon, 01 September 2008 07:54 Go to previous message
Eclipse UserFriend
Originally posted by: stephenbyc.gmail.com

Seweryn Niemiec wrote:
> Stephen pisze:
>> Seweryn Niemiec wrote:
>>> Stephen wrote:
>>>> Hi,
>>>> Now I want to make the compartment fill the parent. Which layout I
>>>> can use to implement it? And how to set the property?
>>>
>>> From my experience the solution depends on GMF version you use, so
>>> which GMF version you use?
>>>
>>
>> Hi,
>> I am using GMF2.1.
>>
>> Thanks,
>>
>> Stephen
>
> Try something like this:
>
> <descriptors
> name="ContainerDescriptor">
> <actualFigure
> xsi:type="gmfgraph:Rectangle"
> name="ContainerFigure">
> <layout
> xsi:type="gmfgraph:GridLayout">
> <margins/>
> <spacing/>
> </layout>
> <children
> xsi:type="gmfgraph:Label"
> name="BasicLabelFigure"
> text="&lt;...>">
> <layoutData
> xsi:type="gmfgraph:GridLayoutData"
> grabExcessHorizontalSpace="true"
> verticalAlignment="BEGINNING"
> horizontalAlignment="FILL"/>
> </children>
> <children
> xsi:type="gmfgraph:Rectangle"
> name="CompartmentFigure"
> outline="false"
> fill="false">
> <layoutData
> xsi:type="gmfgraph:GridLayoutData"
> grabExcessHorizontalSpace="true"
> grabExcessVerticalSpace="true"
> verticalAlignment="FILL"
> horizontalAlignment="FILL"/>
> </children>
> </actualFigure>
> <accessors
> figure="//@figures.0/@descriptors.3/@actualFigure/@children.0 "/>
> <accessors
> figure="//@figures.0/@descriptors.3/@actualFigure/@children.1 "/>
> </descriptors>
>
> It works for me _almost_ without any problems :)
>
> Greetings,
> Seweryn Niemiec

Hi Seweryn,
I am very appreciated for your help! It is really
working after using your method.

Thank you very much!

Stephen
Previous Topic:Direct to GMF editor
Next Topic:Changing Figures at runtime
Goto Forum:
  


Current Time: Fri Apr 26 13:06:25 GMT 2024

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

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

Back to the top