<Swing Dev> [11] RFR JDK-8191106: Nimbus LookAndFeel does not apply keys FileChooser.directoryOpenButtonText/ToolTipText to JFileChooser

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Jan 5 06:05:23 UTC 2018


Hi Semyon,

It's not exactly the same. For Metal, we do not set mnemonic, not sure 
if that is intentional, so did not push it down to basic class.

Regards
Prasanta
On 1/4/2018 9:34 PM, Semyon Sadetsky wrote:
> 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