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 10:11 Go to next message
Erik Schondorff is currently offline Erik Schondorff
Messages: 24
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 04:59 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
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 05:35 Go to previous message
Erik Schondorff is currently offline Erik Schondorff
Messages: 24
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: Wed Jul 30 09:23:41 EDT 2014

Powered by FUDForum. Page generated in 0.02252 seconds