Hi
One thing you could do would be to set a flag and then tell the thread to
wait for a certain length of time. Meanwhile, another thread waits to see if
there is another click. If there is another click in that time interval, it
removes the flag and notifys the first thread. The first thread checks the
flag, and depending on the number of clicks executes your 1-click or 2-click
action.
This would result in a small hang time between one click and the response.
If anyone else has a better suggestion i would be glad to hear it, as im a
bit rusty on thread scheduling :-(.
B.D.
>From: Ashish Aggarwal <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] plz Explain!
>Date: Tue, 31 Jul 2001 18:44:52 -0700
>
>hello Dan!
>
>I am executing events at both getClickCount==1 and
>getClickCount==2. If i had nothing to do at 1, then
>there was no problem. Actually at 1, i am drawing
>lines betwen primitives and at two, I want to remove
>lines between primitives. So, plz explain me. Its
>really urgent.
>
>thnaks
>
>
>
>--- Dan Boorstein <[EMAIL PROTECTED]> wrote:
> > >
> > > From: Ashish Aggarwal <[EMAIL PROTECTED]>
> > > Date: 2001/07/31 Tue PM 01:30:47 EDT
> > > To: [EMAIL PROTECTED]
> > > Subject: [JAVA3D] plz Explain!
> > >
> > > Hello!
> > >
> > > How to differentiate between single click of the
> > mouse
> > > and double click.i am using:
> > >
> > > event.getClickCount() to find out the number of
> > > clicks.
> > > The problem is that, when I double click the
> > mouse, it
> > > executes the code for:
> > >
> > > event.getClickCount()=1, before executing code
> > for:
> > >
> > > event.getClickCount()=2
> > >
> > > I don't want event.getClickCount()=1 to take
> > place
> > > when i am double clicking the mouse. Please reply
> > as I
> > > am stuck for last three days. Hope to get a reply
> > > soon.
> > >
> >
> > Maybe I don't understand your problem correctly, but
> > couldn't you just not do anything when
> > getClickCount==1?
> > At the top of your event handler, just return if
> > it's not
> > 2, otherwise, continue processing.
> >
> > - danboo
> >
> >
>===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff JAVA3D-INTEREST". For
> > general help, send email to
> > [EMAIL PROTECTED] and include in the body of the
> > message "help".
>
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".