Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove the horizontal line in the middle of Compartment?
Remove the horizontal line in the middle of Compartment? [message #207149] Fri, 26 September 2008 11:00 Go to next message
Nikolay Georgiev is currently offline Nikolay GeorgievFriend
Messages: 13
Registered: July 2009
Junior Member
Hello,

in compartments there is a horizontal line above which stays the Label of
the compartment. Normally this line is just under the Label, but somehow
it happened to me that the line now is in the middle of the compartment.
And now the compartments are divided in upper (empty) and bottom (where
elements are added) part, but I would like them as before.

Here is a picture of a compartment:
http://posithing.com/temp/pics/gmf-line-in-the-middle.bmp

You can see that after an element is added to the compartment, the line
moves upwards.

Do you what could be the reason for it and how can I make the line just
stays under the label? The problem is not in the "List Layout" property.

I'm using Eclipse 3.4.0 and GMF SDK 2.1.0 and GMF Runtime 1.1.0

Greetings,
Nikolay
Re: Remove the horizontal line in the middle of Compartment? [message #207158 is a reply to message #207149] Fri, 26 September 2008 11:34 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Nikolay,

I think you have to add aome layout to the figure of an element containing
this compartment (i remember there was something changed in between of GMF
1.0 and 2.0 in this area..) So, you can try adding FlowLayout into the main
element figure. See oeg.graphdef/models/basic.gmfgraph -> NamedNodeRectangle
figure descriptor as an example.

-----------------
Alex Shatalin
Re: Remove the horizontal line in the middle of Compartment? [message #207164 is a reply to message #207149] Fri, 26 September 2008 11:40 Go to previous messageGo to next message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 47
Registered: July 2009
Member
Hi Nikolay,

had the same issue, when I moved from GMF 2.0 (or some Milestone of 2.1) to
GMF 2.1.
In your grafdef-model make sure, you set the correct layouts and constraints
for your elements:

My Figure, that looks like yours has the following definition:
RoundedRectangle XXX
- BorderLayout
- Label XXXLabel
- BorderLayoutData Beginning (vertical is set to true)
- Rectangle XXXCompartment
- BorderLayoutData Center (vertical is also set to true)
- Child Access (... for label)
- Child Access (... for comparment)
should do the trick for you.

HTH
Thomas



"Nikolay Georgiev" <erdtek@gmail.com> schrieb im Newsbeitrag
news:0b9cbfc4806cef3d36a373cb0e3abcdd$1@www.eclipse.org...
> Hello,
>
> in compartments there is a horizontal line above which stays the Label of
> the compartment. Normally this line is just under the Label, but somehow
> it happened to me that the line now is in the middle of the compartment.
> And now the compartments are divided in upper (empty) and bottom (where
> elements are added) part, but I would like them as before.
>
> Here is a picture of a compartment:
> http://posithing.com/temp/pics/gmf-line-in-the-middle.bmp
>
> You can see that after an element is added to the compartment, the line
> moves upwards.
>
> Do you what could be the reason for it and how can I make the line just
> stays under the label? The problem is not in the "List Layout" property.
>
> I'm using Eclipse 3.4.0 and GMF SDK 2.1.0 and GMF Runtime 1.1.0
>
> Greetings,
> Nikolay
>
>
Re: Remove the horizontal line in the middle of Compartment? [message #207564 is a reply to message #207158] Tue, 30 September 2008 18:09 Go to previous messageGo to next message
Nikolay Georgiev is currently offline Nikolay GeorgievFriend
Messages: 13
Registered: July 2009
Junior Member
Hi Alex,

I tried it and the line was moved in the right position! (that was good
:), but then maybe because the container has as layout FlowLayout, I
couldn't add the elements at each position I wanted in the container, for
example I couldn't add an element under an already added element (The
mouse pointer disallowed it), it worked only at its left or right side a
container in my bigger container.

If had only a container without nothing, then I couldn't add elements to
it by clicking in the middle of it. There was only some small area in the
upper/left side of the container where it was allowed for the mouse cursor
to click.

Maybe I need some other layout ... will check it out ...

Thanks,
Nikolay
Re: Remove the horizontal line in the middle of Compartment? [message #207579 is a reply to message #207164] Tue, 30 September 2008 20:11 Go to previous message
Nikolay Georgiev is currently offline Nikolay GeorgievFriend
Messages: 13
Registered: July 2009
Junior Member
Hi Thomas,

Thank you very much for the layout information! It works :))

Nikolay
Previous Topic:Modify palette tool to copy existing resource
Next Topic:Scheme editor, ecore to gmf
Goto Forum:
  


Current Time: Tue Apr 23 14:15:02 GMT 2024

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

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

Back to the top