Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Label centered ?(I want to create a label in a node's center)
icon5.gif  Label centered ? [message #522599] Tue, 23 March 2010 10:27 Go to next message
Alvaro Jimenez Rielo is currently offline Alvaro Jimenez RieloFriend
Messages: 41
Registered: July 2009
Location: Rey Juan Carlos Universit...
Member
Hi everyone,

I'm developing an GMF editor and I need to create a label(Name) in a node's center.

I have created a Rounded Rectangle and I have assigned it a Flow Layout:
Force Single Line: true
Major Alignment: CENTER
Major Spacing: 0
Match Minor Size: true
Minor Alignment: CENTER
Minor Spacing: 0
Vertical: true

Two years ago (using older versions -I think GMF 2.0-), this layout works, but now, the label always appears at left:

I use:
- Eclipse MDT 3.4.2 (Ganymede).
- GMF 2.1.

I have tried Eclipse Galileo (3.5.1) with GMF 2.2 and the problem continues.

Does Anyone know about what is the problem? Any solution?

Regards,
Álvaro
Re: Label centered ? [message #522619 is a reply to message #522599] Tue, 23 March 2010 11:39 Go to previous message
Alvaro Jimenez Rielo is currently offline Alvaro Jimenez RieloFriend
Messages: 41
Registered: July 2009
Location: Rey Juan Carlos Universit...
Member
I have the same problem that this post:

http://www.eclipse.org/forums/index.php?t=msg&goto=21257 8&

I have to add label1.setAlignment(PositionConstants.CENTER); (method createContents in XXXEditPart.java) to center the label. But I want to center the labels from gmfgraph model.


Regards,
Álvaro
Previous Topic:LayoutProvider? LayoutManager?
Next Topic:Multiple view for the same semantic model
Goto Forum:
  


Current Time: Tue Apr 23 09:08:21 GMT 2024

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

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

Back to the top