1 7 package com.sun.java.swing.plaf.gtk; 8 9 import java.awt.*; 10 import javax.swing.plaf.synth.*; 11 12 16 class BlueprintGraphicsUtils extends SynthGraphicsUtils { 17 public void paintText(SynthContext context, Graphics g, String text, 18 int x, int y, int mnemonicIndex) { 19 int state = context.getComponentState(); 20 Region region = context.getRegion(); 21 22 if (((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER 24 && (region == Region.MENU_ITEM || 25 region == Region.CHECK_BOX_MENU_ITEM || 26 region == Region.RADIO_BUTTON_MENU_ITEM)) || 27 ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED 28 && region == Region.MENU)) { 29 g.setColor(context.getStyle().getColor(context, 30 GTKColorType.BLACK)); 31 super.paintText(context, g, text, x + 1, y + 1, mnemonicIndex); 32 33 g.setColor(context.getStyle().getColor(context, 34 GTKColorType.WHITE)); 35 super.paintText(context, g, text, x, y, mnemonicIndex); 36 } else { 37 super.paintText(context, g, text, x, y, mnemonicIndex); 38 } 39 } 40 } 41 | Popular Tags |