int state = context.getComponentState();
Region region = context.getRegion();
// Paint menu and menu items with shadow defined by blueprint colors.
if (((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER
&& (region == Region.MENU_ITEM ||
region == Region.CHECK_BOX_MENU_ITEM ||
region == Region.RADIO_BUTTON_MENU_ITEM)) ||
((state & SynthConstants.SELECTED) == SynthConstants.SELECTED
&& region == Region.MENU)) {
g.setColor(context.getStyle().getColor(context,
GTKColorType.BLACK));
super.paintText(context, g, text, x + 1, y + 1, mnemonicIndex);
g.setColor(context.getStyle().getColor(context,
GTKColorType.WHITE));
super.paintText(context, g, text, x, y, mnemonicIndex);
} else {
super.paintText(context, g, text, x, y, mnemonicIndex);
}