< prev index next >

src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java

Print this page

        

*** 254,264 **** iconSize.height = icon.getIconHeight(); } // accRect if (!accText.equals("")) { ! accSize.width = SwingUtilities2.stringWidth(mi, accFm, accText); accSize.height = accFm.getHeight(); } // textRect if (text == null) { --- 254,265 ---- iconSize.height = icon.getIconHeight(); } // accRect if (!accText.equals("")) { ! accSize.width = SwingUtilities2.getTextUIDrawing(mi) ! .getStringWidth(mi, accFm, accText); accSize.height = accFm.getHeight(); } // textRect if (text == null) {
*** 270,280 **** (int) htmlView.getPreferredSpan(View.X_AXIS); textSize.height = (int) htmlView.getPreferredSpan(View.Y_AXIS); } else { // Text isn't HTML ! textSize.width = SwingUtilities2.stringWidth(mi, fm, text); textSize.height = fm.getHeight(); } } if (useCheckAndArrow) { --- 271,282 ---- (int) htmlView.getPreferredSpan(View.X_AXIS); textSize.height = (int) htmlView.getPreferredSpan(View.Y_AXIS); } else { // Text isn't HTML ! textSize.width = SwingUtilities2.getTextUIDrawing(mi) ! .getStringWidth(mi, fm, text); textSize.height = fm.getHeight(); } } if (useCheckAndArrow) {
< prev index next >