Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to listen event when mouse over a node on diagram?(Listen mouse event on diagram)
How to listen event when mouse over a node on diagram? [message #1698193] Fri, 12 June 2015 03:49 Go to next message
Sann Tran is currently offline Sann TranFriend
Messages: 15
Registered: November 2014
Junior Member
Hi Obeo guys,

I would like to replace the tooltip (that provided by Sirius) by our popup when mouse over a node on diagram. The problem is that I cannot listen the mouse over node event.

Is there any way to listen the mouse event on DNode ?

Thanks,
---
Sann
Re: How to listen event when mouse over a node on diagram? [message #1698256 is a reply to message #1698193] Fri, 12 June 2015 15:01 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello Sann,

I think the simplest way is to provide your own EditPart and EditPolicy.
In your EditPart createDefaultEditPolicies method, for the role
EditPolicyRoles.POPUPBAR_ROLE install your own policy that inherits from
SiriusPopupBarEditPolicy. In your own version the mouseHover method
should call super and then do your popup call.

You can have more information about providing custom EditParts and
EditPolicies [1] in the online documentation.

Regards,
Steve

[1]
https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_style.html

Le 12/06/2015 05:49, Sann Tran a écrit :
> Hi Obeo guys,
>
> I would like to replace the tooltip (that provided by Sirius) by our
> popup when mouse over a node on diagram. The problem is that I cannot
> listen the mouse over node event.
>
> Is there any way to listen the mouse event on DNode ?
>
> Thanks,
> ---
> Sann
>


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to listen event when mouse over a node on diagram? [message #1698365 is a reply to message #1698256] Mon, 15 June 2015 06:54 Go to previous message
Sann Tran is currently offline Sann TranFriend
Messages: 15
Registered: November 2014
Junior Member
Great, thanks so much, Steve Monnier
Previous Topic:Diagram Editor not showing dirty state!
Next Topic:Copy&Paste for a tree item
Goto Forum:
  


Current Time: Fri Apr 26 00:21:03 GMT 2024

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

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

Back to the top