Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Label positioning
Label positioning [message #196621] Fri, 11 July 2008 11:11 Go to next message
Armando is currently offline ArmandoFriend
Messages: 12
Registered: July 2009
Junior Member
Hi all.
I'm trying to understand how to make a label be positioned below an
element, horizontally centered, like this:

(O)
[Label]

In my gmfgraph file, the label isn't defined inside the element figure, but
associeted with it in the gmfmap file.
Could anyone give me a tip? I wasn't able to find a way to manage it...

--
The wind in my heart
The dust in my head
Re: Label positioning [message #196712 is a reply to message #196621] Fri, 11 July 2008 15:26 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Mojique,

You can define invisible rectangle and put label and existing node figure
into it, then use normal layouts to layout label in the center of rectangle.

-----------------
Alex Shatalin
Re: Label positioning [message #196734 is a reply to message #196712] Fri, 11 July 2008 15:39 Go to previous messageGo to next message
Armando is currently offline ArmandoFriend
Messages: 12
Registered: July 2009
Junior Member
Alex Shatalin <vano@borland.com> ha scritto:

> Hello Mojique,
>
> You can define invisible rectangle and put label and existing node figure
> into it, then use normal layouts to layout label in the center of rectangle.

Thank you Alex. Now i wonder whether wrapping the "real" element figure
with an invisible rectangle will make the incoming/outgoing links be
attached to the edge of the invisible figure: this wouldn't be my preferred
behaviour...

--
The wind in my heart
The dust in my head
Re: Label positioning [message #197408 is a reply to message #196734] Wed, 16 July 2008 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi All,

Even i have similar problem where label is associated to the ends of the
connection ,so in my xxxConnectionEditPart the labels are not getting
created inside the Figure class.Hence the addFixedChild() throws
compilation error.

But in my gmfmap the labels are associated properlly.

Any idea why its happening this way..

Note : for now i manually create wrapLabels in Figure class.(Though it
should have been generated automatically)

Thanks in advance.

Regards,
Shwetha
Re: Label positioning [message #197441 is a reply to message #197408] Wed, 16 July 2008 12:47 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Shwetha,

> getting created inside the Figure class.Hence the addFixedChild()
> throws compilation error.
Usually this means you have used incorrect figure for parent of the label
(or for the label itself).
Wich particular compilation error do you have?
If you are going to create label located outside of main figure then you
can reuse org.eclipse.gmf.graphdef/models/basic.gmfgraph/Label diagram label
for it.

-----------------
Alex Shatalin
Previous Topic:Gef3D goes public, or: GEF goes 3D
Next Topic:Cheat Sheet in Ganymede?
Goto Forum:
  


Current Time: Sat Jun 06 12:10:34 GMT 2020

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

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

Back to the top