mouseDoubleClick [message #230319] |
Thu, 08 February 2007 11:54 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03408 seconds