Examples of SeaGlassContext


Examples of com.seaglasslookandfeel.SeaGlassContext

    protected void uninstallListeners(JComponent c) {
        c.removePropertyChangeListener(this);
    }

    protected void uninstallDefaults(JComponent c) {
        SeaGlassContext context = getContext(c, ENABLED);
        style.uninstallDefaults(context);
        context.dispose();
        style = null;
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

    private int getComponentState(JComponent c) {
        return SeaGlassLookAndFeel.getComponentState(c);
    }

    public void update(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        SeaGlassLookAndFeel.update(context, g);
        context.getPainter().paintViewportBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
        paint(context, g);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

        // This does nothing on purpose, JViewport doesn't allow a border
        // and therefor this will NEVER be called.
    }

    public void paint(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        paint(context, g);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

     * Update te control style.
     *
     * @param c the component.
     */
    private void updateStyle(JComponent c) {
        SeaGlassContext context  = getContext(c, ENABLED);
        SynthStyle      oldStyle = style;

        style = SeaGlassLookAndFeel.updateStyle(context, this);
        if (style != oldStyle) {
            if (oldStyle != null) {
                uninstallKeyboardActions((JRootPane) c);
                installKeyboardActions((JRootPane) c);
            }
        }

        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

    /**
     * @see javax.swing.plaf.ComponentUI#update(java.awt.Graphics, javax.swing.JComponent)
     */
    public void update(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        SeaGlassLookAndFeel.update(context, g);
        if (((JRootPane) c).getWindowDecorationStyle() != JRootPane.NONE) {
            context.getPainter().paintRootPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
        } else if (PlatformUtils.isMac()) {
            // We may need to paint the rootpane on a Mac if the window is
            // decorated.
            boolean   shouldPaint       = false;
            Container toplevelContainer = c.getParent();

            if (toplevelContainer instanceof JFrame) {
                shouldPaint = !((JFrame) toplevelContainer).isUndecorated();
            }

            if (shouldPaint) {
                if (!paintTextured) {
                    g.setColor(c.getBackground());
                    g.fillRect(0, 0, c.getWidth(), c.getHeight());
                } else if (isWindowFocused.isInState(c)) {
                    contentActive.paint((Graphics2D) g, c, c.getWidth(), c.getHeight());
                } else {
                    contentInactive.paint((Graphics2D) g, c, c.getWidth(), c.getHeight());
                }
            }
        }

        paint(context, g);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

    /**
     * @see javax.swing.plaf.ComponentUI#paint(java.awt.Graphics, javax.swing.JComponent)
     */
    public void paint(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        paint(context, g);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

    protected void installDefaults() {
        updateStyle(desktopIcon);
    }

    private void updateStyle(JComponent c) {
        SeaGlassContext context = getContext(c, ENABLED);
        style = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

        style = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();
    }

    protected void uninstallDefaults() {
        SeaGlassContext context = getContext(desktopIcon, ENABLED);
        style.uninstallDefaults(context);
        context.dispose();
        style = null;
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

    Region getRegion(JComponent c) {
        return SeaGlassLookAndFeel.getRegion(c);
    }

    public void update(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        SeaGlassLookAndFeel.update(context, g);
        context.getPainter().paintDesktopIconBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
        paint(context, g);
        context.dispose();
    }
View Full Code Here

Examples of com.seaglasslookandfeel.SeaGlassContext

        paint(context, g);
        context.dispose();
    }

    public void paint(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        paint(context, g);
        context.dispose();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.