Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Extend External Label representation and only show it by hovering the mouse
Extend External Label representation and only show it by hovering the mouse [message #1164216] Thu, 31 October 2013 14:11 Go to next message
Erik Schondorff is currently offline Erik SchondorffFriend
Messages: 25
Registered: October 2013
Junior Member
Hi Community,

I have a Figure (an AffixedChild) and an external label for it. Now I want to extend the visual representation of the external label. So some questions / problem comes with this in my mind:

1)
So currently the Figure Descriptor (for the external label) contains just a WrappingLabel as the primary shape. But now I want to have a Rectangle as the primary shape for the visual repr. and the WrappingLabel should be contained directly under the Rectangle. But when I implement the external label this way, I cant select my Figure anymore and the whole Figure is not shown - so I cannot see the Rectangle and no text/WrappingLabel in it. What I have to do, that I can see my label in its parented rectangle and can also select my AffixedChild?

2)
In my currently representation (just a WrappingLabel as an external label) no line is rendered between external label and container, when I move the ext. label. Is there a need for a modification in the *.gmfgen oO?

3)
Now the last questions ^^ (yeahh)
My last aim is to show the external label only when the mouse enters the affixed child and to hide the external label when the mouse leaves the external label. At which (and maybe how) event listeners (probably in the MyElementEditPart.class) I have to "register" my listeners for this logic?

So at all, thanks for your time and thanks in advance.

Best regards,
Erik Smile
Re: Extend External Label representation and only show it by hovering the mouse [message #1169957 is a reply to message #1164216] Mon, 04 November 2013 09:59 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

3) You can register listeners to your figure.

Ralph
Re: Extend External Label representation and only show it by hovering the mouse [message #1176440 is a reply to message #1169957] Fri, 08 November 2013 10:35 Go to previous message
Erik Schondorff is currently offline Erik SchondorffFriend
Messages: 25
Registered: October 2013
Junior Member
Hi Ralph,

( sorry for the delay of this reply Sad )

Ya, but at which listener can I register the mouse events - maybe also an EditPolicy handles MouseEvents?!

But for all in conclusion I solved the hole problem with ToolTips for now, but it is not really this, what I wanted. But it does, what it should do.

Thanks.
Erik
Previous Topic:HELP! SELECTIO FIGURE (SHAPE)
Next Topic:How Can I Enable Delete From Diagram Button
Goto Forum:
  


Current Time: Thu Apr 25 00:29:01 GMT 2024

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

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

Back to the top