Editpart selection [message #189926] |
Mon, 01 August 2005 10:41 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02277 seconds