🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #376

Re: Is there Doubleclick event or listener?

#376
From: Paul Nichols (TeamB)
Date: Fri, 07 Oct 2005 04:40
54 lines
2948 bytes
"Pax" <2mailmeusepax@paxitdotdk> wrote in message
news:4342487b$1@newsgroups.borland.com...
> >> 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:
> >
> >
http://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!
Technical Details
Message-ID: <4344a698$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <433cef44$1@newsgroups.borland.com> <433d4245$1@newsgroups.borland.com> <4342487b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,7918880dea3b7bfe
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Paul Nichols \(TeamB\)" <paul@comp.net>
From: "Paul Nichols \(TeamB\)" <paul@comp.net>
Newsgroups: borland.public.jbuilder.java.swing
References: <433cef44$1@newsgroups.borland.com> <433d4245$1@newsgroups.borland.com> <4342487b$1@newsgroups.borland.com>
Subject: Re: Is there Doubleclick event or listener?
Date: Thu, 6 Oct 2005 23:40:07 -0500
Lines: 56
Organization: clc
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 71.8.64.101
Message-ID: <4344a698$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1128572568 71.8.64.101 (5 Oct 2005 21:22:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail