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 #205755] Wed, 17 September 2008 14:01 Go to next message
Armando is currently offline ArmandoFriend
Messages: 12
Registered: July 2009
Junior Member
Hi all... i can't fix a problem with positioning a label beside the element
it "belongs" to. Here is the situation.
An element Node and a label displaying the "node name"; Node is displayed
by mean of a fixed-size ellipse figure; i'd like the label to be positioned
under the Node, centered, but i also want any connection from/to Node to be
"attached" to the ellipse figure boundary.
If i try to wrap an invisible rectangle around both the ellipse and the
label, connections would be attached to the rectangle boundary.
If i use an "external" label, that is a label figure that isn't a child of
the ellipse figure but is bound to it via mapping, the label can't be moved
freely around the ellipse but snaps to certain fixed positions; i can
accept that the label can be moved around, but in this case i'd like to be
able to move it freely.
Can anybody help me, please?

--
Ba a cagai (cit.)
Re: Label positioning [message #205771 is a reply to message #205755] Wed, 17 September 2008 14:17 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Mojique,

> If i try to wrap an invisible rectangle around both the ellipse and
> the label, connections would be attached to the rectangle boundary.
See IAnchorableFigure. This interface should be implemented by one of the
figures containing "invisible rectangle", so you can modify appropriate methods
to return different ConnectionAnchor implementations. For example - SlidableOvalAnchor/EllipseAnchor..


-----------------
Alex Shatalin
Re: Label positioning [message #205788 is a reply to message #205771] Wed, 17 September 2008 15:07 Go to previous message
Armando is currently offline ArmandoFriend
Messages: 12
Registered: July 2009
Junior Member
Il Wed, 17 Sep 2008 14:17:48 +0000 (UTC), Alex Shatalin ha scritto:

> Hello Mojique,
>
>> If i try to wrap an invisible rectangle around both the ellipse and
>> the label, connections would be attached to the rectangle boundary.
> See IAnchorableFigure. This interface should be implemented by one of the
> figures containing "invisible rectangle", so you can modify appropriate methods
> to return different ConnectionAnchor implementations. For example - SlidableOvalAnchor/EllipseAnchor..

Thank you so much for your answer, Alex; i'll check it out!

--
Razzista!
Previous Topic:performSaveas operation
Next Topic:programmatically open a related diagram
Goto Forum:
  


Current Time: Thu Apr 25 12:55:27 GMT 2024

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

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

Back to the top