From: Peter C. <pe...@ce...> - 2004-04-20 11:54:24
|
Hi Gang, I've recently discovered the Quaqua Look And Feel -- an open-source (LGPL or BSD) implementation of an improved Aqua LaF. Essentially, it makes Swing more Aqua-like than Apple's Aqua LaF is by default. It includes a pure-Java implementation of a column-view style JFileChooser (Happy day!), and fixes a number of misc rendering problems. <http://www.randelshofer.ch/quaqua/download.html> In my attempts to get this LaF working with DrJava, I discovered a quirk of the current LaF config option: it only allows built-in LaFs to be used. The offending code is in config/OptionConstants.java. The LOOK_AND_FEEL constant is set to a ForcedChoiceOption populated by "UIManager.getInstalledLookAndFeels();". Since this is performed statically at class load-time, there's no way to install an alternative LaF before the classname is rejected as an unsupported option. You can make another LaF work by calling "UIManager.installLookAndFeel()" manually in OptionConstants, but this is obviously a dirty, dirty hack. Using a ForcedChoiceOption gives us a nicely rendered combo box in Preferences, but the behavior we want is more like a silent-failing StringOption. Maybe we should have a "PromptedChoiceOption" or somesuch that renders like a ForcedChoiceOptionComponent but allows a user to specify an arbitrary String in the config file. If someone feels ambitious, this shouldn't be hard to implement. As for the Quaqua LaF, I'm going to spend some time with it. If it seems solid, are there any objections on principle to including it as our default LaF? That JFileChooser is very slick. . . . -- Peter |