Issue with Layouts before in gmfgraph diagrams [message #234906] |
Tue, 30 June 2009 16:00 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
Hello,
I'm quite a newcomer in the GMF 2.2 world, and I face an issue regarding
the layouts applied while defining my gmfgraph model.
In fact, I would like to create a Figure Descriptor, which is a rectangle
figure, this figure has a label as a child. This figure is also associated
to a compartment (as the "topic container" in the GMF tutorial)
The problem I face is that i would like the label's size to be static, and
minimal, which is not the default behaviour, since the label size is
always half of the total rounded rectangle size.
I tried to apply grid layout to shrink the size of the label, but using
this one causes the container to be shrunk too.
Which layout should I use to have the requested behaviour ?
Thanks a lot in advance,
Maxence.
|
|
|
|
Re: Issue with Layouts before in gmfgraph diagrams [message #235005 is a reply to message #234964] |
Wed, 01 July 2009 16:32 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
Hello Alex,
I tried the Flow Layout this morning on the rectangle I have, and the
result is farther of the one I want... In fact, the label of the rectangle
is now minimal, but the compartment contained in the rectangle is minimal
also! And what I need is to have a label as small as possible and a
compartment that takes the maximum possible size (i.e. the compartment is
attached to the label of the rectangle on north, and directly attached to
the rectangle's sides on the east, south and west.
Here is what I did...
I created a Flow Layout as a rectangle's child and I set the different
parameters as following : ForceSingleLine -> true, MajorAlignment ->
BEGINNING, MajorSpacing -> 0, MatchMinorSize -> false, MinorAlignment ->
CENTER, MinorSpacing -> 0, Vertical -> true.
Is this enough ? Because doing this leads to a label that takes the
minimal size, but the compartment's bounds are not stuck to the
rectangle's bounds...
Thanks in advance for your help, and for the time you spend on my requests
!
Maxence
|
|
|
|
|
|
Re: Issue with Layouts before in gmfgraph diagrams [message #235195 is a reply to message #235178] |
Fri, 03 July 2009 12:07 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
Alex Shatalin wrote:
> Hello Maxence,
>> I had a look at an ecore_diagram model, and when I create a new
>> EClass, the container (compartment) at the bottom is shrunk (same size
>> as the other compartments in fact), instead of filling the whole
> See attached image - as you can see last compartment in EClass figure is
extended to fill whole space in the figure. If you have only one compartment -
this is AFAIU what you are trying to achieve.
In my case, the compartment is not being expanded, I remarked it when I
selected it (the image is available here
:http://nsm01.casimages.com/img/2009/07/03/09070302031850438 4000217.jpg.
Sorry, but I can't attach images since I'm forced to use the web portal).
And it seems that the "rest" of the image is not the compartment but the
rectangle itself... In my case, this causes that I cannot create any
children in the compartment when the mouse is not precisely on the
compartment, which is too small...
>> to the rectangle stuck to the left (as in a ecore_diagram model). Is
>> there a way to easily center the label ?
> I've used grid layout for it - see second attached image.
Is it possible to combine both flow and grid layout ? because I'd like to
do so in the same rectangle as above... But this point is not important,
this is not a urgent thing ;)
Thanks,
Maxence
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02572 seconds