Reacting on single-click [message #158121] |
Tue, 16 November 2004 11:22 |
Eclipse User |
|
|
|
Originally posted by: iwan.global.co.za
Hello,
I have a typical graphical editor and want to open A view (say viewA) when
a user double-clicks on a node (This part solved from the FAQ), and
another view (say viewB) when a user just clicks on a node. (Or
alternatively double-clicks with shift held in).
I like handling opening of the views in EditPart.performRequest(...) as
recommended in the FAQ for double clicks, since it is not a command that
edits the model.
So, the question is - where do I listen for a single click event, or, how
can I check the status of control keys (like shift) at the time of a
double-click from the mouse?
Thank
-i
|
|
|
Re: Reacting on single-click [message #158130 is a reply to message #158121] |
Tue, 16 November 2004 12:49 |
Eclipse User |
|
|
|
Originally posted by: iwan.global.co.za
Hello,
regarding one part of the question below - I found the methods on
SelectionRequest with which you can check keys - is???KeyPressed. But
they always return false (I'm on Eclipse 3.0.0 & gtk).
-i
Iwan Vosloo wrote:
> Hello,
> I have a typical graphical editor and want to open A view (say viewA) when
> a user double-clicks on a node (This part solved from the FAQ), and
> another view (say viewB) when a user just clicks on a node. (Or
> alternatively double-clicks with shift held in).
> I like handling opening of the views in EditPart.performRequest(...) as
> recommended in the FAQ for double clicks, since it is not a command that
> edits the model.
> So, the question is - where do I listen for a single click event, or, how
> can I check the status of control keys (like shift) at the time of a
> double-click from the mouse?
> Thank
> -i
|
|
|
Re: Reacting on single-click [message #158162 is a reply to message #158121] |
Tue, 16 November 2004 21:24 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
single-click on something which is already selected will send a delayede
DIRECT_EDIT request to the editpart.
Shift+Click is defined as append selection. If you want it to do something
different when the part is already selected, you'll have to extend the
DrgaEditPartsTracker
"Iwan Vosloo" <iwan@global.co.za> wrote in message
news:cncnu4$ior$1@www.eclipse.org...
> Hello,
>
> I have a typical graphical editor and want to open A view (say viewA) when
> a user double-clicks on a node (This part solved from the FAQ), and
> another view (say viewB) when a user just clicks on a node. (Or
> alternatively double-clicks with shift held in).
>
> I like handling opening of the views in EditPart.performRequest(...) as
> recommended in the FAQ for double clicks, since it is not a command that
> edits the model.
>
> So, the question is - where do I listen for a single click event, or, how
> can I check the status of control keys (like shift) at the time of a
> double-click from the mouse?
>
> Thank
> -i
>
|
|
|
Powered by
FUDForum. Page generated in 0.04676 seconds