Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Double Click
Double Click [message #244426] Thu, 17 July 2008 19:56 Go to next message
Michael Swearingen is currently offline Michael SwearingenFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Everyone,

I was wondering if there was a (hopefully not too difficult) way of adding
double click support to my project. I'd like to have it where you can
double click on a shape and then I'll do something specific to each shape.
I tried adding a mouse listener (org.eclipse.draw2d.MouseListener) but I
could never get the functions to be called. Any ideas / suggestions?

Thanks,
MS
Re: Double Click [message #244429 is a reply to message #244426] Fri, 18 July 2008 04:27 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
In your editPart,

public void performRequest(Request req) {
if (req.getType().equals(RequestConstants.REQ_OPEN)) {
// do double click
}
super.performRequest(req);
}



- Prakash

www.eclipse-tips.com


Michael S. wrote:
> Hi Everyone,
>
> I was wondering if there was a (hopefully not too difficult) way of
> adding double click support to my project. I'd like to have it where
> you can double click on a shape and then I'll do something specific to
> each shape. I tried adding a mouse listener
> (org.eclipse.draw2d.MouseListener) but I could never get the functions
> to be called. Any ideas / suggestions?
>
> Thanks,
> MS
>
Re: Double Click [message #244439 is a reply to message #244429] Fri, 18 July 2008 15:58 Go to previous message
Michael Swearingen is currently offline Michael SwearingenFriend
Messages: 26
Registered: July 2009
Junior Member
Thanks for the tip / code Prakash, it works like a charm. Thanks for the
link too, I've already bookmarked it.
Previous Topic:ActiveX Support In Draw2d?
Next Topic:Gef3D goes public, or: GEF goes 3D
Goto Forum:
  


Current Time: Tue Dec 23 04:41:00 GMT 2014

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

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