FileDocCategorySizeDatePackage
BlueprintGraphicsUtils.javaAPI DocJava SE 5 API1540Fri Aug 26 14:54:44 BST 2005com.sun.java.swing.plaf.gtk

BlueprintGraphicsUtils

public class BlueprintGraphicsUtils extends SynthGraphicsUtils
version
1.5 12/19/03
author
Joshua Outwater

Fields Summary
Constructors Summary
Methods Summary
public voidpaintText(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, java.lang.String text, int x, int y, int mnemonicIndex)

        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);
        }