Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Label behaviour in GMF2.1
Label behaviour in GMF2.1 [message #220842] Tue, 10 March 2009 07:08 Go to next message
Steffen Becker is currently offline Steffen BeckerFriend
Messages: 31
Registered: July 2009
Member
Hi,

I'm trying to migrate GMF2.0 editors to GMF2.1. I have a problem with
the labels of the nodes but could not find an answer. I want the node
label and its icon centred at the top of the node.

The problem has already been described but not solved before (see
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13974.html)

Is there a solution by now? I would rather dislike using generated not's
or patch the generator as this was the default behaviour in GMF2.0.

Thanks,
Steffen
Re: Label behaviour in GMF2.1 [message #220857 is a reply to message #220842] Tue, 10 March 2009 10:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Hello Steffen,

you can center a label with the GridLayout:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg16168.html

Julia


Steffen Becker schrieb:
> Hi,
>
> I'm trying to migrate GMF2.0 editors to GMF2.1. I have a problem with
> the labels of the nodes but could not find an answer. I want the node
> label and its icon centred at the top of the node.
>
> The problem has already been described but not solved before (see
> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13974.html)
>
> Is there a solution by now? I would rather dislike using generated not's
> or patch the generator as this was the default behaviour in GMF2.0.
>
> Thanks,
> Steffen
Re: Label behaviour in GMF2.1 [message #220864 is a reply to message #220857] Tue, 10 March 2009 10:56 Go to previous messageGo to next message
Steffen Becker is currently offline Steffen BeckerFriend
Messages: 31
Registered: July 2009
Member
Hi,

thanks for the answer, but it was not what I intended. The label should
be in center position but on the north border of the figure, i.e.,
centred only horizontally but not vertically.

Thanks,
Steffen

Cayla Sha schrieb:
> Hello Steffen,
>
> you can center a label with the GridLayout:
> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg16168.html
>
> Julia
>
>
> Steffen Becker schrieb:
>> Hi,
>>
>> I'm trying to migrate GMF2.0 editors to GMF2.1. I have a problem with
>> the labels of the nodes but could not find an answer. I want the node
>> label and its icon centred at the top of the node.
>>
>> The problem has already been described but not solved before (see
>> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13974.html)
>>
>> Is there a solution by now? I would rather dislike using generated
>> not's or patch the generator as this was the default behaviour in GMF2.0.
>>
>> Thanks,
>> Steffen
Re: Label behaviour in GMF2.1 [message #220871 is a reply to message #220842] Tue, 10 March 2009 11:00 Go to previous messageGo to next message
Steffen Becker is currently offline Steffen BeckerFriend
Messages: 31
Registered: July 2009
Member
Hi,

I found another difference in the labels layout. In GMF 2.1 my labels
now look like this (gmfgraph model is unchanged):
**************************************
*Label1 *
* *
* *
*Label2 *
* *
* *
**************************************
*Compartment1 *
* *
* *
**************************************
*Compartment2 *
* *
* *
**************************************
This means their height is equal to the height of the compartments. In
GMF2.0 they used to be centered and the space below them was not there,
i.e., it looked like:
**************************************
* Label1 *
* Label2 *
**************************************
*Compartment1 *
* *
* *
**************************************
*Compartment2 *
* *
* *
**************************************

Has the default layout manager changed between GMF2.0 and GMF2.1 as it
seems so? Or has the handling of compartments been changed?

Thanks,
Steffen

Steffen Becker schrieb:
> Hi,
>
> I'm trying to migrate GMF2.0 editors to GMF2.1. I have a problem with
> the labels of the nodes but could not find an answer. I want the node
> label and its icon centred at the top of the node.
>
> The problem has already been described but not solved before (see
> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13974.html)
>
> Is there a solution by now? I would rather dislike using generated not's
> or patch the generator as this was the default behaviour in GMF2.0.
>
> Thanks,
> Steffen
Re: Label behaviour in GMF2.1 [message #220878 is a reply to message #220864] Tue, 10 March 2009 12:00 Go to previous message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

-> gd.verticalAlignment = GridData.BEGINNING;

*...*


Steffen Becker schrieb:
> Hi,
>
> thanks for the answer, but it was not what I intended. The label should
> be in center position but on the north border of the figure, i.e.,
> centred only horizontally but not vertically.
>
> Thanks,
> Steffen
>
> Cayla Sha schrieb:
>> Hello Steffen,
>>
>> you can center a label with the GridLayout:
>> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg16168.html
>>
>> Julia
>>
>>
>> Steffen Becker schrieb:
>>> Hi,
>>>
>>> I'm trying to migrate GMF2.0 editors to GMF2.1. I have a problem with
>>> the labels of the nodes but could not find an answer. I want the node
>>> label and its icon centred at the top of the node.
>>>
>>> The problem has already been described but not solved before (see
>>> http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13974.html)
>>>
>>>
>>> Is there a solution by now? I would rather dislike using generated
>>> not's or patch the generator as this was the default behaviour in
>>> GMF2.0.
>>>
>>> Thanks,
>>> Steffen
Previous Topic:problems with emf constraints live validation with gmf
Next Topic:ShowRelatedElementsRequest & ShowHideRelationshipRequest
Goto Forum:
  


Current Time: Fri Feb 26 19:18:57 GMT 2021

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

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

Back to the top