jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java
changeset 38995 c1812168a1e9
parent 30461 57e36ed1a9ab
child 39542 1073ea3df2c7
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Tue May 24 14:30:31 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Wed May 25 14:59:15 2016 +0530
@@ -228,6 +228,15 @@
             arrowIcon instanceof UIResource) {
             arrowIcon = UIManager.getIcon(prefix + ".arrowIcon");
         }
+        updateCheckIcon();
+    }
+
+    /**
+     * Updates check Icon based on column layout
+     */
+    private void updateCheckIcon() {
+        String prefix = getPropertyPrefix();
+
         if (checkIcon == null ||
             checkIcon instanceof UIResource) {
             checkIcon = UIManager.getIcon(prefix + ".checkIcon");
@@ -238,8 +247,8 @@
                     BasicGraphicsUtils.isLeftToRight(menuItem), menuItem);
             if (isColumnLayout) {
                 MenuItemCheckIconFactory iconFactory =
-                    (MenuItemCheckIconFactory) UIManager.get(prefix
-                        + ".checkIconFactory");
+                        (MenuItemCheckIconFactory) UIManager.get(prefix
+                                + ".checkIconFactory");
                 if (iconFactory != null
                         && MenuItemLayoutHelper.useCheckAndArrow(menuItem)
                         && iconFactory.isCompatible(checkIcon, prefix)) {
@@ -1090,6 +1099,8 @@
                 BasicHTML.updateRenderer(lbl, text);
             } else if (name  == "iconTextGap") {
                 defaultTextIconGap = ((Number)e.getNewValue()).intValue();
+            } else if (name == "horizontalTextPosition") {
+                updateCheckIcon();
             }
         }
     }