Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:51 Go to next message
Anna is currently offline AnnaFriend
Messages: 34
Registered: July 2009
Member
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 12:47 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
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 13: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: Sun Mar 07 16:21:43 GMT 2021

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

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

Back to the top