On Fri, 6 May 2022 14:47:39 GMT, Tejesh R <d...@openjdk.java.net> wrote:

>> In Button ToolTip, Mnemonic key string was shown only in Metal Look and 
>> Feel, since the feature is implemented in it. In other L&F especially 
>> Windows L&F the feature is not available. In order to make it available for 
>> other L&F's, the getAcceleratedString method and 
>> calculateAcceleratedStringSpace method is Implemented in ToolTipUI class. 
>> These methods are used in BasicToolTipUI class which uses the feature and 
>> shows/paints the ToolTip String along with the set Mnemonic key. In similar 
>> way other L&F which doesn't Inherit BasicToolTipUI can make use of the 
>> feature available in ToolTipUI.
>
> Tejesh R has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Added Regression Test JToolTip/5047379/bug5047379.java

This will require CSR

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java line 
63:

> 61:      * The space between strings.
> 62:      */
> 63:     public static final int padSpaceBetweenStrings = 12;

I guess this can be removed from here and BasicToolTipUI as it is being defined 
in ToolTipUI

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java line 
199:

> 197:     // shared.
> 198:     @SuppressWarnings("deprecation")
> 199:     public String getAcceleratorString() {

Although it is being placed in its super class so it can still be accessed
but am still not sure if you can remove this public method from this public 
class without notifying via @deprecated or @forRemoval tag

test/jdk/javax/swing/JToolTip/5047379/bug5047379.java line 4:

> 2:    @bug 5047379
> 3:    @summary Checks that tooltips are rendered properly
> 4:    @author Shannon Hickey

Remove @author tag

test/jdk/javax/swing/JToolTip/5047379/bug5047379.java line 127:

> 125:                             toolTipObj = (MetalToolTipUI) 
> MetalToolTipUI.createUI(tooltip);
> 126:                             break;
> 127:                         case "WindowsClassic":

Since it is supposed to be run on all platforms, this L&F cannot be hardcoded 
as this will not be applicable/present in all platforms

-------------

PR: https://git.openjdk.java.net/jdk/pull/8496

Reply via email to