Skip to main content



      Home
Home » Eclipse Projects » GEF » HoverFeedbackPart
HoverFeedbackPart [message #1805502] Tue, 16 April 2019 07:43 Go to next message
Eclipse UserFriend
Hello,

In HoverFeedbackPart is the visual with an effect defined. The default effect is DropShadow. How could we apply another hover effect?
I extended a customer HoverFeedbackPart and overrode the method getHoverFeedbackEffect. But I noticed that the HoverFeedbackPart is hard coded in DefaultHoverFeedbackPartFactory. Is it possible to make it configurable like the color or geometry provider? Thank you.

Bests
Shenwei Zheng
Re: HoverFeedbackPart [message #1805850 is a reply to message #1805502] Thu, 25 April 2019 08:17 Go to previous message
Eclipse UserFriend
Hi Shenwei,

DefaultHoverFeedbackPartFactory asks the Guice injector to create an instance of HoverFeedbackPart. Therefore, the actual implementation can be exchanged by binding HoverFeedbackPart to a subclass.

class Module {
  configure() {
    bind(HoverFeedbackPart.class).to(CustomHoverFeedbackPart.class);
  }
}


If this is not sufficient in your case, then you have to exchange the factory and create your custom feedback part there.

I am not a big fan of the provider mechanism, because it clutters the module with verbose bindings. However, you are correct that it would be easier to exchange if done like that. I will think about this.

Best regards,
Matthias
Previous Topic:Resize of SVGPaths
Next Topic:GEF 5: Allow only some Connections
Goto Forum:
  


Current Time: Sat Apr 26 11:22:57 EDT 2025

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

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

Back to the top