/*
* in case .checkIconFactory is defined for this UI and the icon is
* compatible with it then the icon is handled by the checkIcon.
* That is if useCheckAndArrow() is true.
*/
MenuItemCheckIconFactory iconFactory =
(MenuItemCheckIconFactory) UIManager.get(getPropertyPrefix()
+ ".checkIconFactory");
if (! useCheckAndArrow()
|| iconFactory == null
|| ! iconFactory.isCompatible(checkIcon, getPropertyPrefix())) {
icon = b.getIcon();
}
// layout the text and icon
String text = layoutMenuItem(
fm, b.getText(), fmAccel, acceleratorText, icon,