Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » mouseDoubleClick
mouseDoubleClick [message #230319] Thu, 08 February 2007 11:54 Go to next message
Eclipse UserFriend
Originally posted by: one.eight.three.gmail.com

hi,

i've read the previous post here but i dont understand it.
i have a rectangle Shape as my figure and i would like to implement a
double-click mouseEvent. but its not possible as the only event triggered
is the MousePressed event. i understand from the GEF developer FAQ that i
would have to use the mousePressed event to call the doubleClicked event.
but how do i use the performRequest method and where do i
implement/override it in?

EditPart meaning my ShapeEditPart? i tried printing out the different
events that happen to the figure. but none that returns REQ_OPEN in the
canExecute() method.
Re: mouseDoubleClick [message #230327 is a reply to message #230319] Thu, 08 February 2007 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johan.piculell.ericsson.com

Hi. Not sure if this helps but I just solved a similar problem by looking
at this discussion:
http://www.eclipsezone.com/eclipse/forums/t51950.html

I wanted to catch doubleclick events in a TreeViewer and found that adding
the following code to my AbstractTreeEditPart subclass did the trick:

public DragTracker getDragTracker(Request req) {
return new SelectEditPartTracker(this);
}

public void performRequest(Request request) {
if (request.getType() == RequestConstants.REQ_OPEN)
{
// Do whatever you want....
}
}

Maybe this can give you some leads for your problem.

regards
/Johan
Re: mouseDoubleClick [message #230342 is a reply to message #230327] Fri, 09 February 2007 02:42 Go to previous message
Eclipse UserFriend
Originally posted by: one.eight.three.gmail.com

thanks! it works nicely!
Previous Topic:Snapping bottom of figure to grid
Next Topic:Bug in SnapToGrid
Goto Forum:
  


Current Time: Thu Mar 28 18:52:18 GMT 2024

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

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

Back to the top