Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Centering the text in a label
Centering the text in a label [message #219935] Wed, 25 February 2009 04:51 Go to next message
Eclipse UserFriend
I have changed the look on my state-nodes from an ordinary rectangle to a
rounded rectangle. This caused the label with the state name to be placed
a bit outside of the figure, so that when I add a name to my state it is
shown like in this picture:
http://farm4.static.flickr.com/3440/3265528805_dd9642471f_o. jpg
It might not be too easy to see, but the first letter of the name is
partially placed outside of the figure. I don't like this, so I would like
to center the text in the label (I have to assume that no state name is
longer than the length of the figure). Is this possible? And where can I
make this change?

Thanks,
Anna
Re: Centering the text in a label [message #219988 is a reply to message #219935] Wed, 25 February 2009 07:47 Go to previous messageGo to next message
Eclipse UserFriend
Hello Anna,

In .gmfgraph model you have to specify corresponding Layout/LayoutData for
label parent lement/label.

-----------------
Alex Shatalin
Re: Centering the text in a label [message #219995 is a reply to message #219935] Wed, 25 February 2009 08:06 Go to previous message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Hello Anna,

This issue was already discussed here:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg16168.html

You use the GridLayout on the Figure of the EditPart (the inner class
inside of the EditPart). And the Label gets the GridLayoutData.

Best wishes
Julia


Anna S schrieb:
> I have changed the look on my state-nodes from an ordinary rectangle to
> a rounded rectangle. This caused the label with the state name to be
> placed a bit outside of the figure, so that when I add a name to my
> state it is shown like in this picture:
> http://farm4.static.flickr.com/3440/3265528805_dd9642471f_o. jpg
> It might not be too easy to see, but the first letter of the name is
> partially placed outside of the figure. I don't like this, so I would
> like to center the text in the label (I have to assume that no state
> name is longer than the length of the figure). Is this possible? And
> where can I make this change?
>
> Thanks,
> Anna
>
Previous Topic:gmf-diagram change
Next Topic:[Announce] GMF 2.2.0 I200902250554 is available
Goto Forum:
  


Current Time: Wed Jul 23 21:11:17 EDT 2025

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

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

Back to the top