Board index » jbuilder » Is there Doubleclick event or listener?

Is there Doubleclick event or listener?


2005-09-30 03:56:43 PM
jbuilder18
I have tried to find an implementation for detecting a doubleclick in
JBuilder2005 without succes.
Is there none?
Peder Skånning
 
 

Re:Is there Doubleclick event or listener?

Pax wrote:
Quote
I have tried to find an implementation for detecting a doubleclick in
JBuilder2005 without succes.
Double-clicking is a condition that you can test for
when handling a mouse event. So yes, JBuilder assists
you in writing the stub of the mouse handling code, but
it's up to you to test for a double-click by writing
code inside the mouse event handler which JBuilder
creates for you in the Designer.
Google:
+mouse +"double-click" +java
Here's one of the better hits:
java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
--
Paul Furbacher (TeamB)
Save time, search the archives:
info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

Re:Is there Doubleclick event or listener?

Quote
>I have tried to find an implementation for detecting a doubleclick in
>JBuilder2005 without succes.

Double-clicking is a condition that you can test for
when handling a mouse event. So yes, JBuilder assists
you in writing the stub of the mouse handling code, but
it's up to you to test for a double-click by writing
code inside the mouse event handler which JBuilder
creates for you in the Designer.

Google:

+mouse +"double-click" +java

Here's one of the better hits:

java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html

Thank You Paul!
I got that to work all right, but...
When I implement it on a tableframe, the second click drowns, because
cliking a tableframe has a build in handler that changes the clicked cell to
edit mode. Why is the event drowned in Java and not sent on to the next
level in the hieracy?
In Delphi events boubles up and can be catched on any level, but in Java
they seem to die once they are catched.
Do I need to study event handling in Java harder, or is there a trick to
send the event on?
Peder
 

{smallsort}

Re:Is there Doubleclick event or listener?

"Pax" <2mailmeusepax@paxitdotdk>wrote in message
Quote
>>I have tried to find an implementation for detecting a doubleclick in
>>JBuilder2005 without succes.
>
>Double-clicking is a condition that you can test for
>when handling a mouse event. So yes, JBuilder assists
>you in writing the stub of the mouse handling code, but
>it's up to you to test for a double-click by writing
>code inside the mouse event handler which JBuilder
>creates for you in the Designer.
>
>Google:
>
>+mouse +"double-click" +java
>
>Here's one of the better hits:
>
>
java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
>
Thank You Paul!

I got that to work all right, but...

When I implement it on a tableframe, the second click drowns, because
cliking a tableframe has a build in handler that changes the clicked cell
to
edit mode. Why is the event drowned in Java and not sent on to the next
level in the hieracy?

In Delphi events boubles up and can be catched on any level, but in Java
they seem to die once they are catched.

Do I need to study event handling in Java harder, or is there a trick to
send the event on?

Peder

ActionEvents and ListenerEvents are much different than in their Delphi
Counterparts, just as EventHandlers are different between Unix and Windows.
You need to study these models to learn the differences. Keep in mind that
Java levels of asbtraction are much higher than those in Delphi, especially
true on ListenerEvents.
If the TableModel you are using has a DefaultHandler (which it does in a
DefaultTableModel), you will need to override the functionality in the
DefaultTableModel, or choose another TableModel and implement your new
events in that Model. Sun has very good tutorials on their sight about
Events and Listeners and TableModels.
Good luck!