FileDocCategorySizeDatePackage
WindowsDesktopIconUI.javaAPI DocJava SE 5 API2411Fri Aug 26 14:54:48 BST 2005com.sun.java.swing.plaf.windows

WindowsDesktopIconUI

public class WindowsDesktopIconUI extends BasicDesktopIconUI
Windows icon for a minimized window on the desktop.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

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

        return new WindowsDesktopIconUI();
    
public java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)
Windows desktop icons are restricted to a width of 160 pixels by default. This value is retrieved by the DesktopIcon.width property.

        Dimension dim = super.getMinimumSize(c);
        dim.width = width;
        return dim;
    
public java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)

        // Windows desktop icons can not be resized.  Therefore, we should
        // always return the minimum size of the desktop icon. See
        // getMinimumSize(JComponent c).
        return getMinimumSize(c);
    
protected voidinstallComponents()

        iconPane = new WindowsInternalFrameTitlePane(frame);
        desktopIcon.setLayout(new BorderLayout());
        desktopIcon.add(iconPane, BorderLayout.CENTER);

	if (XPStyle.getXP() != null) {
	    desktopIcon.setBorder(null);
	}
    
public voidinstallDefaults()

        super.installDefaults();
        width = UIManager.getInt("DesktopIcon.width");
    
public voidinstallUI(javax.swing.JComponent c)

	super.installUI(c);

	c.setOpaque(XPStyle.getXP() == null);
    
public voiduninstallUI(javax.swing.JComponent c)

        WindowsInternalFrameTitlePane thePane =
                                        (WindowsInternalFrameTitlePane)iconPane;
        super.uninstallUI(c);
        thePane.uninstallListeners();