Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Need getSingleClickFeature() clarification
Need getSingleClickFeature() clarification [message #1777360] Tue, 28 November 2017 20:39 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
In JavaDoc it says
Quote:

Returns a feature which will be executed at at a single click on an already selected shape...

Why such a restriction? This means that the executed when PE is clicked and then clicked again, why can't this method be called when PE is clicked the first time, without being selected. Is there another method that does single click without prior selection?

Thanks,
Alex
Re: Need getSingleClickFeature() clarification [message #1777398 is a reply to message #1777360] Wed, 29 November 2017 08:10 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1899
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Alex,

the single click feature was build in the same way as the already existing double click feature. Besides Graphiti always operates on selected shapes.

If you are interested in the first click you might hook into the selection by overriding IToolBehaviorProvider.getSelection(...) method, but there is no feature that is triggered at that time.

HTH,
Michael
Re: Need getSingleClickFeature() clarification [message #1777448 is a reply to message #1777398] Wed, 29 November 2017 12:57 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 528
Registered: November 2009
Senior Member
Thanks Michael. Can I distinguish between hover over and mouse click in getSelection(...)? It's triggered even when mouse pointer is hovered over the figure.
Re: Need getSingleClickFeature() clarification [message #1777458 is a reply to message #1777448] Wed, 29 November 2017 13:59 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1899
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Ah yes, right. This is used for the hover feedback as well.

Hm, I'm afraid you cannot distiguish these cases.

Michael
Previous Topic:Tutorial of e4 RCP application with graphiti
Next Topic:DirectedEditMultiText
Goto Forum:
  


Current Time: Mon Nov 19 08:54:33 GMT 2018

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

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

Back to the top