Package com.seaglasslookandfeel

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


    public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
        ((SeaGlassContext) context).getPainter().paintSplitPaneBorder(context, g, x, y, w, h);
    }

    private void paintDragDivider(Graphics g, int x, int y, int w, int h) {
        SeaGlassContext context = getContext(splitPane, Region.SPLIT_PANE_DIVIDER);
        context.setComponentState(((context.getComponentState() | MOUSE_OVER) ^ MOUSE_OVER) | PRESSED);
        Shape oldClip = g.getClip();
        g.clipRect(x, y, w, h);
        context.getPainter().paintSplitPaneDragDivider(context, g, x, y, w, h, splitPane.getOrientation());
        g.setClip(oldClip);
        context.dispose();
    }
View Full Code Here

    protected void installDefaults(JLabel c) {
        updateStyle(c);
    }

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

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

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

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

        viewRect.y = i.top;
        viewRect.width = width - (i.right + viewRect.x);
        viewRect.height = height - (i.bottom + viewRect.y);

        // layout the text and icon
        SeaGlassContext context = getContext(label);
        FontMetrics fm = context.getComponent().getFontMetrics(context.getStyle().getFont(context));
        context.getStyle().getGraphicsUtils(context).layoutText(context, fm, label.getText(), label.getIcon(),
            label.getHorizontalAlignment(), label.getVerticalAlignment(), label.getHorizontalTextPosition(),
            label.getVerticalTextPosition(), viewRect, iconRect, textRect, label.getIconTextGap());
        View view = (View) label.getClientProperty(BasicHTML.propertyKey);
        int baseline;
        if (view != null) {
            baseline = BasicHTML.getHTMLBaseline(view, textRect.width, textRect.height);
            if (baseline >= 0) {
                baseline += textRect.y;
            }
        } else {
            baseline = textRect.y + fm.getAscent();
        }
        context.dispose();
        return baseline;
    }
View Full Code Here

     * Notifies this UI delegate that it's time to paint the specified
     * component. This method is invoked by <code>JComponent</code> when the
     * specified component is being painted.
     */
    public void update(Graphics g, JComponent c) {
        SeaGlassContext context = getContext(c);

        SeaGlassLookAndFeel.update(context, g);
        context.getPainter().paintLabelBackground(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

    }

    public Dimension getPreferredSize(JComponent c) {
        JLabel label = (JLabel) c;
        Icon icon = (label.isEnabled()) ? label.getIcon() : label.getDisabledIcon();
        SeaGlassContext context = getContext(c);
        Dimension size = context.getStyle().getGraphicsUtils(context).getPreferredSize(context,
            context.getStyle().getFont(context), label.getText(), icon, label.getHorizontalAlignment(),
            label.getVerticalAlignment(), label.getHorizontalTextPosition(), label.getVerticalTextPosition(),
            label.getIconTextGap(), label.getDisplayedMnemonicIndex());

        context.dispose();
        return size;
    }
View Full Code Here

    }

    public Dimension getMinimumSize(JComponent c) {
        JLabel label = (JLabel) c;
        Icon icon = (label.isEnabled()) ? label.getIcon() : label.getDisabledIcon();
        SeaGlassContext context = getContext(c);
        Dimension size = context.getStyle().getGraphicsUtils(context).getMinimumSize(context, context.getStyle().getFont(context),
            label.getText(), icon, label.getHorizontalAlignment(), label.getVerticalAlignment(), label.getHorizontalTextPosition(),
            label.getVerticalTextPosition(), label.getIconTextGap(), label.getDisplayedMnemonicIndex());

        context.dispose();
        return size;
    }
View Full Code Here

    }

    public Dimension getMaximumSize(JComponent c) {
        JLabel label = (JLabel) c;
        Icon icon = (label.isEnabled()) ? label.getIcon() : label.getDisabledIcon();
        SeaGlassContext context = getContext(c);
        Dimension size = context.getStyle().getGraphicsUtils(context).getMaximumSize(context, context.getStyle().getFont(context),
            label.getText(), icon, label.getHorizontalAlignment(), label.getVerticalAlignment(), label.getHorizontalTextPosition(),
            label.getVerticalTextPosition(), label.getIconTextGap(), label.getDisplayedMnemonicIndex());

        context.dispose();
        return size;
    }
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.