cannot capture mouse double click event [message #226778] |
Thu, 23 November 2006 07:50 |
Eclipse User |
|
|
|
Originally posted by: yabing.crimsonlogic.com
Hi,
I have a EditPolicy to capture the Mouse double click event, however
the returned request in the method getCommand(Request request) never match
the type REQ.OPEN, which is supposed to be double click event. the type of
request I got are only delete and createChild.
how can I capture the REQ.OPEN request through EditPolicy's request? or
there is another way to capture the mouse event upon a figure? thanks.
|
|
|
Re: cannot capture mouse double click event [message #226895 is a reply to message #226778] |
Fri, 24 November 2006 21:44 |
Anthony Hunter Messages: 446 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0044_01C70FE7.D9F43230
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Hi Chen
You can simply handle the request in the performRequest() method in your =
EditPart:
public void performRequest(Request request) {
if (REQ_OPEN.equals(request.getType())) {
MessageDialog.openInformation(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), "Double Click =
Worked", //$NON-NLS-1$
"Double Click on a node worked"); //$NON-NLS-1$
}
super.performRequest(request);
}
Cheers...
Anthony
"Chen Yabing" <yabing@crimsonlogic.com> wrote in message =
news:bd7bab0ed10599cce6d49da2223539d6$1@www.eclipse.org...
> Hi,
> I have a EditPolicy to capture the Mouse double click event, =
however=20
> the returned request in the method getCommand(Request request) never =
match=20
> the type REQ.OPEN, which is supposed to be double click event. the =
type of=20
> request I got are only delete and createChild.=20
> how can I capture the REQ.OPEN request through EditPolicy's request? =
or=20
> there is another way to capture the mouse event upon a figure? thanks.
>=20
>
------=_NextPart_000_0044_01C70FE7.D9F43230
Content-Type: text/html;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2900.2995" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi Chen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>You can simply handle the request in =
the=20
performRequest() method in your EditPart:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2> public void=20
performRequest(Request request) =
{<BR> =20
if (REQ_OPEN.equals(request.getType()))=20
{<BR> =20
MessageDialog.openInformation(PlatformUI.getWorkbench()<BR> &n=
bsp; &n bsp; &n b=
sp;=20
..getActiveWorkbenchWindow().getShell(), "Double Click Worked",=20
//$NON-NLS-1$<BR> &n=
bsp; =20
"Double Click on a node worked");=20
//$NON-NLS-1$<BR> =20
}<BR> =20
super.performRequest(request);<BR> }<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Cheers...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Anthony</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Chen Yabing" <</FONT><A=20
href=3D"mailto:yabing@crimsonlogic.com"><FONT face=3DArial=20
size=3D2>yabing@crimsonlogic.com</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message </FONT><A=20
href=3D"news:bd7bab0ed10599cce6d49da2223539d6$1@www.eclipse.org"><FONT =
face=3DArial=20
size=3D2>news:bd7bab0ed10599cce6d49da2223539d6$1@www.eclipse.org</FONT></=
A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>>=20
Hi,<BR>> I have a EditPolicy to capture the Mouse =
double=20
click event, however <BR>> the returned request in the method=20
getCommand(Request request) never match <BR>> the type REQ.OPEN, =
which is=20
supposed to be double click event. the type of <BR>> request I got =
are only=20
delete and createChild. <BR>> how can I capture the REQ.OPEN request =
through=20
EditPolicy's request? or <BR>> there is another way to capture the =
mouse=20
event upon a figure? thanks.<BR>> <BR>></FONT></BODY></HTML>
------=_NextPart_000_0044_01C70FE7.D9F43230--
|
|
|
Powered by
FUDForum. Page generated in 0.03005 seconds