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

Semyon Sadetsky semyon.sadetsky at oracle.com
Tue Jan 30 16:52:33 UTC 2018


Hi Prasanta,

Can you explain why Nimbus should get those mnemonics but Metal not.

--Semyon


On 01/30/2018 02:16 AM, Prasanta Sadhukhan wrote:
> Hi,
>
> Any comments about the fix?
>
> Regards
> Prasanta
> On 1/6/2018 1:00 PM, Sergey Bylokhov wrote:
>> On 04/01/2018 22:05, Prasanta Sadhukhan wrote:
>>> 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.
>>
>> They were intentionally dropped: 
>> https://bugs.openjdk.java.net/browse/JDK-8080628
>>
>>>
>>> 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