I just wrote a patch for NetBeans which provides MS-Office style
tooltips in lists and trees, if there is not enough space for the
entire cell to be displayed - so moving the mouse over any not-
fully-displayed items shows a popup that for all intents and
purposes looks as if it's extending out the side of the tree or
list - it's supposed to look seamless.
As is predictable, I'm using javax.swing.PopupFactory to create the
popups. There is just one problem, but it makes the results a bit
unattractive on mac-os: Sometimes, if the popup is a heavyweight
window, it has a drop shadow (including a small right border
dividing it from the rest of the component. It's compounded a bit
by the fact that Apple's implementation of PopupFactory doesn't
seem to get the algorithm for deciding when to use a heavyweight
window quite right - sometimes, apparently randomly, it will use a
heavyweight window even though a lightweight popup would work just
fine.
I could write a workaround by providing my own PopupFactory
implementation, if I knew a way to turn off the drop-shadow for the
heavyweight popup window that would sometimes legitimately be
needed. Anybody know a way to do it (dirty hacks are acceptable)?
In 'Swing Hacks' (O'Reilly) there is an example of adding custom drop-
shadows to menus (Ch 1, Hack 11). Perhaps, by using the custom-code,
you could switch-off the effect and get what you want. Looking at the
sample code; PopupFactory isn't used. The book's worth looking at :-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden