Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Lable outside the figure
Lable outside the figure [message #209504] Wed, 15 February 2006 16:52 Go to next message
Stefan Mueller is currently offline Stefan MuellerFriend
Messages: 3
Registered: July 2009
Junior Member
Hi,

when we create a Polylineconnection we are able to add labels "outside"
of the label. If we use the implementation of GMF we are able to move
the label.

Now we want to do the same thing for a "normal" figure. Is it possible
to create a figure which has a label outside? The label should be
moveable and the label's position is relative to the figure


*******************
* *
* *
* *
* *
*******************

HelloWorld

Now we move the label:


*******************
* *
* * HelloWorld
* *
* *
*******************

And now the figure:


*******************
* *
* * HelloWorld
* *
* *
*******************


Best regards,

Stefan
Re: Lable outside the figure [message #209527 is a reply to message #209504] Wed, 15 February 2006 19:25 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi,

I have had the same problem. I have solved them that
the label and the 'normal figure' have the same parent.

/---Label
parentContainer --/
\
\---Figure

.....AND the Figure has a Reference to the label.

If you move the Figure you must move the Label with the diff. too.
If you move the Label do nothing with the parent.

Now the Label has always the same relative position to the Figure.



greetings

Andreas
Re: Lable outside the figure [message #209561 is a reply to message #209527] Thu, 16 February 2006 08:48 Go to previous messageGo to next message
Stefan Mueller is currently offline Stefan MuellerFriend
Messages: 3
Registered: July 2009
Junior Member
Hi,

thanks for the answer. I have considered a similar solution but as far
as I understand the parent container will do clipping to its children so
I have to resize the aprent container if I move the Label around.
This will generate huge invisible parent container which have to be
synchronized when dragging labels around.

Greetings,

Stefan


FreeGroup wrote:
> Hi,
>
> I have had the same problem. I have solved them that
> the label and the 'normal figure' have the same parent.
>
> /---Label
> parentContainer --/
> \
> \---Figure
>
> ....AND the Figure has a Reference to the label.
>
> If you move the Figure you must move the Label with the diff. too.
> If you move the Label do nothing with the parent.
>
> Now the Label has always the same relative position to the Figure.
>
>
>
> greetings
>
> Andreas
Re: Lable outside the figure [message #209664 is a reply to message #209561] Fri, 17 February 2006 17:53 Go to previous message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi,

the parentContainer is my common container for ALL elements.
In my case I have only one parentContainer, the rootEditPart

greetings

Andreas
Previous Topic:DirectedGraph connection routing
Next Topic:Property Window
Goto Forum:
  


Current Time: Thu Apr 25 06:51:25 GMT 2024

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

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

Back to the top