<Swing Dev> [15] RFR JDK-8216329: Cannot resize CheckBoxItemMenu in Synth L&F with setHorizontalTextPosition

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Feb 7 22:44:19 UTC 2020


Hi, Vladislav.
On 2/5/20 5:25 am, Volodin, Vladislav wrote:
>      /*Returns a property prefix
>       * @return a property prefix */
>      protected String getPropertyPrefix() {
>          return "MenuItem";
>      }
> 
> I don't understand  why it was created as the method. Since you are changing this part, maybe it will make sense and replace it with a constant string? I hope Java compile can optimize method calls in situations like this one, if you use constant strings:

This is a protected method in the public class in "javax.swing.plaf.basic" package so this is the "Public API" which cannot be changed(at least hard to change)


-- 
Best regards, Sergey.


More information about the swing-dev mailing list