B
B Young
I've written a highly customized JList that lays cells out
horizontally, wrapping, and is editable. This is presenting a problem
with one piece of default JList behaviour that I need to change or
remove and install my own functionality.
My JList can have a lot of white space potentially at the right and
bottom depending on the number of items and preferred sizes, etc.
Well, There is no such thing as a click inside a JList that doesn't
register and select *something*. You can click into what appears to be
never-never-land and guess what, it selects the nearest cell. I have
better logic I'd like to install for when something gets selected, but
how do I get at the default behaviour? What do I remove, override,
etc?
P.S. I've tried overriding "int locationToIndex(Point p)" and making
it work "properly", returning -1 if the mouse click was nowhere near
an actual cell. No good though- doesn't look like its being called by
JList to determine what to select.
Sincerely
Thanks.
horizontally, wrapping, and is editable. This is presenting a problem
with one piece of default JList behaviour that I need to change or
remove and install my own functionality.
My JList can have a lot of white space potentially at the right and
bottom depending on the number of items and preferred sizes, etc.
Well, There is no such thing as a click inside a JList that doesn't
register and select *something*. You can click into what appears to be
never-never-land and guess what, it selects the nearest cell. I have
better logic I'd like to install for when something gets selected, but
how do I get at the default behaviour? What do I remove, override,
etc?
P.S. I've tried overriding "int locationToIndex(Point p)" and making
it work "properly", returning -1 if the mouse click was nowhere near
an actual cell. No good though- doesn't look like its being called by
JList to determine what to select.
Sincerely
Thanks.