Package com.sun.java.swing.plaf.windows.XPStyle

Examples of com.sun.java.swing.plaf.windows.XPStyle.Skin


            size = new Dimension(6, 6);
            XPStyle xp = XPStyle.getXP();
            if (xp != null) {
                boolean vertical = ((JSeparator)c).getOrientation() == SwingConstants.VERTICAL;
                Part part = vertical ? Part.TP_SEPARATOR : Part.TP_SEPARATORVERT;
                Skin skin = xp.getSkin(c, part);
                size.width = skin.getWidth();
                size.height = skin.getHeight();
            }

            if (((JSeparator)c).getOrientation() == SwingConstants.VERTICAL) {
                size.height = 0;
            } else {
View Full Code Here


        Dimension size = c.getSize();

        XPStyle xp = XPStyle.getXP();
        if (xp != null) {
            Part part = vertical ? Part.TP_SEPARATOR : Part.TP_SEPARATORVERT;
            Skin skin = xp.getSkin(c, part);

            int dx = vertical ? (size.width - skin.getWidth()) / 2 : 0;
            int dy = vertical ? 0 : (size.height - skin.getHeight()) / 2;
            int dw = vertical ? skin.getWidth() : size.width;
            int dh = vertical ? size.height : skin.getHeight();
            skin.paintSkin(g, dx, dy, dw, dh, null);
        } else {

        Color temp = g.getColor();

        UIDefaults table = UIManager.getLookAndFeelDefaults();
View Full Code Here

     */
    static int getGutterWidth() {
        int rv = 2;
        XPStyle xp = XPStyle.getXP();
        if (xp != null) {
            Skin skin = xp.getSkin(null, Part.MP_POPUPGUTTER);
            rv = skin.getWidth();
        }
        return rv;
    }
View Full Code Here

    @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);
View Full Code Here

        if (xp != null) {
            Part part = frame.isIcon() ? Part.WP_MINCAPTION
                                       : (frame.isMaximum() ? Part.WP_MAXCAPTION
                                                            : Part.WP_CAPTION);
            State state = frame.isSelected() ? State.ACTIVE : State.INACTIVE;
            Skin skin = xp.getSkin(this, part);
            skin.paintSkin(g, 00, getWidth(), getHeight(), state);
        } else {
            Boolean gradientsOn = (Boolean)LookAndFeel.getDesktopPropertyValue(
                "win.frame.captionGradientsOn", Boolean.valueOf(false));
            if (gradientsOn.booleanValue() && g instanceof Graphics2D) {
                Graphics2D g2 = (Graphics2D)g;
View Full Code Here

            XPStyle xp = XPStyle.getXP();
            return (xp != null) ? xp.getSkin(c, Part.TVP_GLYPH) : null;
        }

        public void paintIcon(Component c, Graphics g, int x, int y) {
            Skin skin = getSkin(c);
            if (skin != null) {
                skin.paintSkin(g, x, y, State.OPENED);
                return;
            }

            Color     backgroundColor = c.getBackground();
View Full Code Here

            g.setColor(Color.black);
            g.drawLine(x + 2, y + HALF_SIZE, x + (SIZE - 3), y + HALF_SIZE);
        }

        public int getIconWidth() {
            Skin skin = getSkin(null);
            return (skin != null) ? skin.getWidth() : SIZE;
        }
View Full Code Here

            Skin skin = getSkin(null);
            return (skin != null) ? skin.getWidth() : SIZE;
        }

        public int getIconHeight() {
            Skin skin = getSkin(null);
            return (skin != null) ? skin.getHeight() : SIZE;
        }
View Full Code Here

        static public Icon createCollapsedIcon() {
            return new CollapsedIcon();
        }

        public void paintIcon(Component c, Graphics g, int x, int y) {
            Skin skin = getSkin(c);
            if (skin != null) {
                skin.paintSkin(g, x, y, State.CLOSED);
            } else {
            super.paintIcon(c, g, x, y);
            g.drawLine(x + HALF_SIZE, y + 2, x + HALF_SIZE, y + (SIZE - 3));
            }
        }
View Full Code Here

    }

    protected Dimension getPreferredInnerHorizontal() {
        XPStyle xp = XPStyle.getXP();
        if (xp != null) {
             Skin skin = xp.getSkin(progressBar, Part.PP_BAR);
             return new Dimension(
                     (int)super.getPreferredInnerHorizontal().getWidth(),
                     skin.getHeight());
         }
         return super.getPreferredInnerHorizontal();
    }
View Full Code Here

TOP

Related Classes of com.sun.java.swing.plaf.windows.XPStyle.Skin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.