<Swing Dev> [11] RFR JDK-8191106: Nimbus LookAndFeel does not apply keys FileChooser.directoryOpenButtonText/ToolTipText to JFileChooser
Semyon Sadetsky
semyon.sadetsky at oracle.com
Thu Jan 4 16:04:48 UTC 2018
Hi Prasanta,
Since all those L&F's now have the same implementation of the method
maybe it worth to push it down to the basic class?
--Semyon
On 01/04/2018 02:33 AM, Prasanta Sadhukhan wrote:
> Hi All,
>
> Please review a fix for Nimbus L&F where it is seen that
> When you select a directory in a JFileChooser dialog, the text and
> tooltip of the "approve" button is not changing to the values of
> UIManager keys FileChooser.directoryOpenButtonText and
> FileChooser.directoryOpenButtonToolTipText and remain same as it was
> before directory is selected.
> It changes for Metal and windows l&f.
>
> This is because when directory is selected
> BasicFileChooserUI#valueChanged() calls setDirectorySelected() but
> it's not implemented for nimbus l&f and it uses default implementation
> of BasicFileChooser.
> For Metal & Windows, this method is overridden to change the approve
> button text to FileChooser.directoryOpenButtonText.
> Propsosed fix is to override this method for Nimbus L&f and set the
> approve button text to FileChooser.directoryOpenButtonText.
>
> Bug:https://bugs.openjdk.java.net/browse/JDK-8191106
> webrev: http://cr.openjdk.java.net/~psadhukhan/8191106/webrev.00/
>
> Regards
> Prasanta
>
More information about the swing-dev
mailing list