Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Editpart selection
Editpart selection [message #189926] Mon, 01 August 2005 10:41 Go to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Am I right in thinking that the following is the way current edit part
selection works: when a click event is received on the edit part then it
is in the "selected" state, once in this state further mouse clicks on the
edit part will result in dispatches to EditPart::performRequest(request)
with an appropriate request. If so, my question is: how do get the first
event which causes the "selected" state to be considered as one of the
event involved in creating a request for "performRequest"? The reason is
that we are having to effectively click 2 times on the EP to create a
RequestConstants.REQ_DIRECT_EDIT request and 3 times to create a
RequestConstants.REQ_OPEN, we would like to reduce this to 1 and 2
respectively.

Thanks.

James
Re: Editpart selection [message #190005 is a reply to message #189926] Mon, 01 August 2005 16:39 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

Single-clicking on a selected editpart = REQ_DIRECT_EDIT (same as the
Windows platform)
Double-clicking on an editpart (irrespective of whether it is selected or
not) = REQ_OPEN

You can change this behaviour by providing a custom drag tracker from your
EditPart's getDragTracker() method. Set a breakpoint in
SelectionTool#mouseDown() and step into the code to see how selection
occurs.

I would, however, recommend against changing this behaviour.

"James Willans" <james.willans@xactium.com> wrote in message
news:bfef7dce607ccb7cefed16890e61f931$1@www.eclipse.org...
> Am I right in thinking that the following is the way current edit part
> selection works: when a click event is received on the edit part then it
> is in the "selected" state, once in this state further mouse clicks on the
> edit part will result in dispatches to EditPart::performRequest(request)
> with an appropriate request. If so, my question is: how do get the first
> event which causes the "selected" state to be considered as one of the
> event involved in creating a request for "performRequest"? The reason is
> that we are having to effectively click 2 times on the EP to create a
> RequestConstants.REQ_DIRECT_EDIT request and 3 times to create a
> RequestConstants.REQ_OPEN, we would like to reduce this to 1 and 2
> respectively.
>
> Thanks.
>
> James
>
Previous Topic:REQ_DELETE_DEPENDANT
Next Topic:aplha just for windows?
Goto Forum:
  


Current Time: Thu Apr 18 07:38:25 GMT 2024

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

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

Back to the top