🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ListCellRenderer & Mouse...

#8907
From: Greg Hamer
Date: Fri, 23 Jun 2000 00:00
33 lines
1668 bytes
The cell renderer is not there when you click on the list. One instance is
used and re-used during painting to paint each visible cell of the list. You
can listen to the JList and use locationToIndex and getCellBounds to figure
out what cell and where in that cell the mouse click happened.

micks <saturnes@total.net> wrote in message news:39535989@dnews...
> Hi, i cannot create a MouseListener in the interface ListCellRenderer.
>
> This implementation is mandatory because, i need to know which coord.(X,
Y)
> the user click in a specific cell from the listbox so that i can drag and
> drop a fixed section(x1, y1, width, height).
>
> I already got a technique to get the coord(X, Y) but unfortunately, i'm
just
> able to get the MouseListener globally for the listbox and not for each
cell
> and by this way, it's not useful for me...
>
> I would be very greatfull to anyone that can recommand a solution, or
offer
> any help, please !!!
>
> P:S: The listbox is used to do design and graphic and text.
>
> Thank you.
>
> Michel Desgroseillers
>
> saturnes@total.net
> mdesgroseillers@ordiplan.com
>
>
Technical Details
Message-ID: <8j07ol$i6h4@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <39535989@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,4abb7a4ad5f0d3a4
X-Google-Attributes: gid111d45,public
From: "Greg Hamer" <ghamer@corp.netzero.net>
Subject: Re: ListCellRenderer & Mouse...
Date: 2000/06/23
Message-ID: <8j07ol$i6h4@bornews.borland.com>
X-Deja-AN: 638148513
References: <39535989@dnews>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing