Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ListLayout in compartments not working as expected
ListLayout in compartments not working as expected [message #216113] Thu, 22 January 2009 13:07 Go to next message
Christian Muth is currently offline Christian MuthFriend
Messages: 24
Registered: July 2009
Junior Member
Hello folks,


i got a little problem using a figure descriptor (ShowMessageFigure)
with a Rectangle in it (ShowMessageRectangle) and with 2 Compartments in
it: TitleCompartment and MessageCompartment.

Each of these compartments is itself represented by a seperate Rectangle
(TitleCompartmentRectangle & MessageCompartmentRectangle) inside the
ShowMessageRectangle to be mapped in the CompartmentMapping in .gmfmap.

Each Compartment in turn is container for another figure descriptor
representing a Rectangle (MessageRectangle). This MessageRectangle has
one child, the ThesaurusRefsRechtangle, which contains instances of a
figure descriptor (ThesaurusRefFigure, simply containing one Label)
organized in a StackLayout.

I want the figure to look like this:

+======================================+
| ShowMessage Label |
+======================================+
| TitleCompartmentRectangle |
|+------------------------------------+|
|| MessageRectangle ||
||+----------------------------------+||
||| ThesaurusRefsRectangle |||
||| |||
||| * ThesaurusId 1 |||
||| * ThesaurusId 2 |||
||+----------------------------------+||
|+------------------------------------+|
+======================================+
| MessageCompartmentRectangle |
| |
| The message compartment shall have |
| exactly same inner structure like |
| title compartment |
| |
+======================================+

Each Rectangle except ThesaurusRefFigure (this one is StackLayout)
contains a FlowLayout like follows:

- Force Single Line true
- Major Alignment BEGINNING
- Major Spacing 0
- Match Minor Size true
- Minor Alignment CENTER
- Minor Spacing 0
- Vertical true

But the MessageRectangle instances don't fit to
TitleCompartmentRectangle's width, see:

http://img244.imageshack.us/img244/999/default3cb2.gif


What am i doing wrong? Could someone pls give me a hint?


TIA

Christian
Re: ListLayout in compartments not working as expected [message #216452 is a reply to message #216113] Tue, 27 January 2009 10:05 Go to previous messageGo to next message
Christian Muth is currently offline Christian MuthFriend
Messages: 24
Registered: July 2009
Junior Member
hi again,


i now tried several combinations of no layout inside the compartment
rectangles, listlayout in .genmodel set to true/false, etc.
could please one you have a short look on my example above and give me a
hint how to achieve the goal that the message rectangles span to their
parent.

or more generally: how best to achieve that child figures expand to the
height/width of their parent figures?

thanks a lot in advance, this issue is bothering me for days now...


christian
Re: ListLayout in compartments not working as expected [message #216501 is a reply to message #216113] Tue, 27 January 2009 16:03 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Try GMF's ConstrainedToolbarLayout as a layout manager for the top level
figure (instead of StackLayout). Keep default size of figures - width =
-1, height = -1, such that the actual size is determined by the layout
managers.
Hopr this helps.

Cheers,
Alex
Re: ListLayout in compartments not working as expected [message #216756 is a reply to message #216501] Thu, 29 January 2009 18:40 Go to previous messageGo to next message
Christian Muth is currently offline Christian MuthFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Alex,


thanks for your answer! I've finally chosen another approach and will
start a separate thread for it to share my thoughts.


Cheers

Christian
Re: ListLayout in compartments not working as expected [message #216886 is a reply to message #216113] Fri, 30 January 2009 13:03 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Christian,

To correct this problem you have to open .gmfgen model and modify GenCompartment
representing TitleCompartment/MessageCompartment by setting "listLayout"
property to true. Then regenerate code.

-----------------
Alex Shatalin
Previous Topic:Diagram partitioning - with outline
Next Topic:GMF printing all diagrams in a project with a single click
Goto Forum:
  


Current Time: Fri Feb 26 19:43:15 GMT 2021

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

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

Back to the top