|
|
||
Romain Guy's BlogSynth Week, File ChooserPosted by gfx on September 23, 2005 at 10:59 PM | Comments (3)When you bring up a Swing file chooser in Tiger with the Synth look and feel you get a perfectly blank window. Styling Fear not my friends, for this issue has been addressed by bug fix #4972060. You can now declare a few properties to draw the appropriate icons: <defaultsProperty key="FileView.directoryIcon" value="directoryIcon" /> <defaultsProperty key="FileView.fileIcon" value="fileIcon" /> <defaultsProperty key="FileView.computerIcon" value="computerIcon" /> <defaultsProperty key="FileView.hardDriveIcon" value="hardDriveIcon" /> <defaultsProperty key="FileView.floppyDriveIcon" value="floppyDriveIcon" /> Note that each value is the ID of an <imageIcon /> declared in the same style element. Anyway, everything's fine, right? Well... almost. Contrary to most file choosers, especially Basic, Metal and Windows ones, Synth file chooser is lacking four features: create a new folder, browse to parent folder, go to home directory and the choice between the list view and the detailled view. We therefore tackled bug #4972060. These features appear as three buttons and a couple of toggle buttons on top of the file chooser. You can set their icons in a similar fashion as file view icons: <defaultsProperty key="FileChooser.newFolderIcon" value="newFolderIcon" /> <defaultsProperty key="FileChooser.upFolderIcon" value="upFolderIcon" /> <defaultsProperty key="FileChooser.homeFolderIcon" value="homeFolderIcon" /> <defaultsProperty key="FileChooser.detailsViewIcon" value="detailsViewIcon" /> <defaultsProperty key="FileChooser.listViewIcon" value="listViewIcon" /> You should now be able to give file choosers the exact appearance you were wishing for. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|