@Override
public void paint(Graphics g, JComponent c) {
if (WindowsMenuItemUI.isVistaPainting()) {
XPStyle xp = XPStyle.getXP();
Skin skin = xp.getSkin(c, Part.MP_POPUPBACKGROUND);
skin.paintSkin(g, 0, 0, c.getWidth(),c.getHeight(), State.NORMAL);
int textOffset = getTextOffset(c);
if (textOffset >= 0
/* paint gutter only for leftToRight case */
&& isLeftToRight(c)) {
skin = xp.getSkin(c, Part.MP_POPUPGUTTER);
int gutterWidth = getGutterWidth();
int gutterOffset =
textOffset - getSpanAfterGutter() - gutterWidth;
c.putClientProperty(GUTTER_OFFSET_KEY,
Integer.valueOf(gutterOffset));
Insets insets = c.getInsets();
skin.paintSkin(g, gutterOffset, insets.top,
gutterWidth, c.getHeight() - insets.bottom - insets.top,
State.NORMAL);
} else {
if (c.getClientProperty(GUTTER_OFFSET_KEY) != null) {
c.putClientProperty(GUTTER_OFFSET_KEY, null);