< prev index next >
src/java.desktop/share/classes/sun/swing/MenuItemLayoutHelper.java
Print this page
@@ -254,11 +254,12 @@
iconSize.height = icon.getIconHeight();
}
// accRect
if (!accText.equals("")) {
- accSize.width = SwingUtilities2.stringWidth(mi, accFm, accText);
+ accSize.width = SwingUtilities2.getTextUIDrawing(mi)
+ .getStringWidth(mi, accFm, accText);
accSize.height = accFm.getHeight();
}
// textRect
if (text == null) {
@@ -270,11 +271,12 @@
(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.width = SwingUtilities2.getTextUIDrawing(mi)
+ .getStringWidth(mi, fm, text);
textSize.height = fm.getHeight();
}
}
if (useCheckAndArrow) {
< prev index next >