public class

MetalDesktopIconUI

extends BasicDesktopIconUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.DesktopIconUI
       ↳ javax.swing.plaf.basic.BasicDesktopIconUI
         ↳ javax.swing.plaf.metal.MetalDesktopIconUI

Class Overview

Metal desktop icon.

Summary

[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicDesktopIconUI
Public Constructors
MetalDesktopIconUI()
Public Methods
static ComponentUI createUI(JComponent c)
Dimension getMaximumSize(JComponent c)
Desktop icons can not be resized.
Dimension getMinimumSize(JComponent c)
Returns the specified component's minimum size appropriate for the look and feel.
Dimension getPreferredSize(JComponent c)
Returns the specified component's preferred size appropriate for the look and feel.
Protected Methods
void installComponents()
void installDefaults()
void installListeners()
void uninstallComponents()
void uninstallListeners()
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicDesktopIconUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Public Constructors

public MetalDesktopIconUI ()

Public Methods

public static ComponentUI createUI (JComponent c)

public Dimension getMaximumSize (JComponent c)

Desktop icons can not be resized. Therefore, we should always return the minimum size of the desktop icon.

Parameters
c the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns
  • a Dimension object or null

public Dimension getMinimumSize (JComponent c)

Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Parameters
c the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns
  • a Dimension object or null

public Dimension getPreferredSize (JComponent c)

Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Parameters
c the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

Protected Methods

protected void installComponents ()

protected void installDefaults ()

protected void installListeners ()

protected void uninstallComponents ()

protected void uninstallListeners ()