FileDocCategorySizeDatePackage
SynthPanelUI.javaAPI DocJava SE 5 API3191Fri Aug 26 14:58:12 BST 2005javax.swing.plaf.synth

SynthPanelUI

public class SynthPanelUI extends BasicPanelUI implements sun.swing.plaf.synth.SynthUI, PropertyChangeListener
Synth's PanelUI.
version
1.12, 12/19/03
author
Steve Wilson

Fields Summary
private SynthStyle
style
Constructors Summary
Methods Summary
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)

        return new SynthPanelUI();
    
private intgetComponentState(javax.swing.JComponent c)

        return SynthLookAndFeel.getComponentState(c);
    
private javax.swing.plaf.synth.SynthContextgetContext(javax.swing.JComponent c, int state)

        return SynthContext.getContext(SynthContext.class, c,
                    SynthLookAndFeel.getRegion(c), style, state);
    
public javax.swing.plaf.synth.SynthContextgetContext(javax.swing.JComponent c)

        return getContext(c, getComponentState(c));
    
private javax.swing.plaf.synth.RegiongetRegion(javax.swing.JComponent c)

        return SynthLookAndFeel.getRegion(c);
    
protected voidinstallDefaults(javax.swing.JPanel p)

        updateStyle(p);
    
protected voidinstallListeners(javax.swing.JPanel p)

        p.addPropertyChangeListener(this);
    
public voidinstallUI(javax.swing.JComponent c)

        JPanel p = (JPanel)c;

        super.installUI(c);
        installListeners(p);
    
public voidpaint(java.awt.Graphics g, javax.swing.JComponent c)

        SynthContext context = getContext(c);

        paint(context, g);
        context.dispose();
    
protected voidpaint(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g)

        // do actual painting
    
public voidpaintBorder(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)

        context.getPainter().paintPanelBorder(context, g, x, y, w, h);
    
public voidpropertyChange(java.beans.PropertyChangeEvent pce)

        if (SynthLookAndFeel.shouldUpdateStyle(pce)) {
            updateStyle((JPanel)pce.getSource());
        }
    
protected voiduninstallDefaults(javax.swing.JPanel p)

        SynthContext context = getContext(p, ENABLED);

        style.uninstallDefaults(context);
        context.dispose();
        style = null;
    
protected voiduninstallListeners(javax.swing.JPanel p)

        p.removePropertyChangeListener(this);
    
public voiduninstallUI(javax.swing.JComponent c)

        JPanel p = (JPanel)c;

        uninstallListeners(p);
        super.uninstallUI(c);
    
public voidupdate(java.awt.Graphics g, javax.swing.JComponent c)

        SynthContext context = getContext(c);

        SynthLookAndFeel.update(context, g);
        context.getPainter().paintPanelBackground(context,
                          g, 0, 0, c.getWidth(), c.getHeight());
        paint(context, g);
        context.dispose();
    
private voidupdateStyle(javax.swing.JPanel c)

        SynthContext context = getContext(c, ENABLED);
        style = SynthLookAndFeel.updateStyle(context, this);
        context.dispose();