Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Reacting on single-click
Reacting on single-click [message #158121] Tue, 16 November 2004 11:22 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Problems with setting the location/bounds of IFigure
Next Topic:getTargetEditPart method
Goto Forum:
  


Current Time: Fri Jan 17 09:18:47 GMT 2025

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

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

Back to the top