Package com.seaglasslookandfeel

Examples of com.seaglasslookandfeel.SeaGlassContext


        }
    }

    private void updateStyle(JDesktopPane c) {
        SynthStyle oldStyle = style;
        SeaGlassContext context = getContext(c, ENABLED);
        style = SeaGlassLookAndFeel.updateStyle(context, this);
        if (oldStyle != null) {
            uninstallKeyboardActions();
            installKeyboardActions();
        }
        context.dispose();
    }
View Full Code Here


        desktop.removePropertyChangeListener(this);
        super.uninstallListeners();
    }

    protected void uninstallDefaults() {
        SeaGlassContext context = getContext(desktop, ENABLED);

        style.uninstallDefaults(context);
        context.dispose();
        style = null;

        if (taskBar != null) {
            for (Component comp : taskBar.getComponents()) {
                JInternalFrame.JDesktopIcon desktopIcon = (JInternalFrame.JDesktopIcon) comp;
View Full Code Here

    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().paintDesktopPaneBackground(context, g, 0, 0, c.getWidth(), c.getHeight());
        paint(context, g);
        context.dispose();
    }
View Full Code Here

        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

        }
        updateStyle(popupMenu);
    }

    private void updateStyle(JComponent c) {
        SeaGlassContext context = getContext(c, ENABLED);
        Window window = SwingUtilities.getWindowAncestor(popupMenu);
        if (PlatformUtils.isMac() && window != null) {
            WindowUtils.makeWindowNonOpaque(window);
        }
        SeaGlassStyle oldStyle = style;
        style = (SeaGlassStyle) SeaGlassLookAndFeel.updateStyle(context, this);
        if (style != oldStyle) {
            if (oldStyle != null) {
                uninstallKeyboardActions();
                installKeyboardActions();
            }
        }
        context.dispose();
    }
View Full Code Here

        super.installListeners();
        popupMenu.addPropertyChangeListener(this);
    }

    protected void uninstallDefaults() {
        SeaGlassContext context = getContext(popupMenu, ENABLED);

        style.uninstallDefaults(context);
        context.dispose();
        style = null;

        if (popupMenu.getLayout() instanceof UIResource) {
            popupMenu.setLayout(null);
        }
View Full Code Here

        maxIconOffset = Math.max(maxIconOffset, offset);
        return maxIconOffset;
    }

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

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

        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

            iconList = ((JDialog) rootParent).getIconImages();
        }
       
        Image frameIcon = iconList != null && iconList.size() > 0 ? iconList.get(0) : null;

        SeaGlassContext context   = getContext(this);

        if (frameIcon != null) {
            Dimension maxSize   = (Dimension) context.getStyle().get(context, "InternalFrameTitlePane.maxFrameIconSize");
            int       maxWidth  = 16;
            int       maxHeight = 16;

            if (maxSize != null) {
                maxWidth  = maxSize.width;
                maxHeight = maxSize.height;
            }
            menuButton.setIcon(new ImageIcon(frameIcon.getScaledInstance(maxWidth, maxHeight, Image.SCALE_SMOOTH)));
        }

        context.dispose();
    }
View Full Code Here

    /**
     * Uninstall the defaults.
     */
    public void uninstallDefaults() {
        SeaGlassContext context = getContext(this, ENABLED);

        style.uninstallDefaults(context);
        context.dispose();
        style = null;
    }
View Full Code Here

TOP

Related Classes of com.seaglasslookandfeel.SeaGlassContext

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.