javax.swing.plaf.basic

Class BasicDesktopIconUI

public class BasicDesktopIconUI extends DesktopIconUI

This class acts as the UI delegate for JDesktopIcons for the Basic look and feel.
Nested Class Summary
classBasicDesktopIconUI.MouseInputHandler
This helper class handles mouse events that occur on the JDesktopIcon.
Field Summary
protected JInternalFrame.JDesktopIcondesktopIcon
The JDesktopIcon this UI delegate represents.
protected JInternalFrameframe
The JInternalFrame associated with the JDesktopIcon.
Constructor Summary
BasicDesktopIconUI()
Creates a new BasicDesktopIconUI object.
Method Summary
protected MouseInputListenercreateMouseInputListener()
This method creates a new MouseInputListener for the JDesktopIcon.
static ComponentUIcreateUI(JComponent c)
This method creates a new BasicDesktopIconUI for the given JComponent.
voiddeiconize()
This method deiconizes the JInternalFrame associated with the JDesktopIcon.
InsetsgetInsets(JComponent c)
This method returns the insets of the given JComponent.
DimensiongetMaximumSize(JComponent c)
This method returns the maximum size for the given JComponent.
DimensiongetMinimumSize(JComponent c)
This method returns the minimum size for the given JComponent.
DimensiongetPreferredSize(JComponent c)
This method returns the preferred size for the given JComponent.
protected voidinstallComponents()
This method installs the necessary sub components for the JDesktopIcon.
protected voidinstallDefaults()
This method installs the defaults for the JDesktopIcon.
protected voidinstallListeners()
This method installs the listeners needed by this UI.
voidinstallUI(JComponent c)
This method installs the UI for the given JComponent.
protected voiduninstallComponents()
This method uninstalls the sub components for the JDesktopIcon.
protected voiduninstallDefaults()
This method uninstalls the defaults for the JDesktopIcon.
protected voiduninstallListeners()
This method uninstalls the listeners needed by the UI.
voiduninstallUI(JComponent c)
This method uninstalls the UI for the given JComponent.

Field Detail

desktopIcon

protected JInternalFrame.JDesktopIcon desktopIcon
The JDesktopIcon this UI delegate represents.

frame

protected JInternalFrame frame
The JInternalFrame associated with the JDesktopIcon.

Constructor Detail

BasicDesktopIconUI

public BasicDesktopIconUI()
Creates a new BasicDesktopIconUI object.

Method Detail

createMouseInputListener

protected MouseInputListener createMouseInputListener()
This method creates a new MouseInputListener for the JDesktopIcon.

Returns: A new MouseInputListener.

createUI

public static ComponentUI createUI(JComponent c)
This method creates a new BasicDesktopIconUI for the given JComponent.

Parameters: c The JComponent to create a UI for.

Returns: A new BasicDesktopIconUI.

deiconize

public void deiconize()
This method deiconizes the JInternalFrame associated with the JDesktopIcon.

getInsets

public Insets getInsets(JComponent c)
This method returns the insets of the given JComponent.

Parameters: c The JComponent to find insets for.

Returns: The insets of the given JComponent.

getMaximumSize

public Dimension getMaximumSize(JComponent c)
This method returns the maximum size for the given JComponent.

Parameters: c The JComponent to find a maximum size for.

Returns: The maximum size.

getMinimumSize

public Dimension getMinimumSize(JComponent c)
This method returns the minimum size for the given JComponent.

Parameters: c The JComponent to find a minimum size for.

Returns: The minimum size.

getPreferredSize

public Dimension getPreferredSize(JComponent c)
This method returns the preferred size for the given JComponent.

Parameters: c The JComponent to find a preferred size for.

Returns: The preferred size.

installComponents

protected void installComponents()
This method installs the necessary sub components for the JDesktopIcon.

installDefaults

protected void installDefaults()
This method installs the defaults for the JDesktopIcon.

installListeners

protected void installListeners()
This method installs the listeners needed by this UI.

installUI

public void installUI(JComponent c)
This method installs the UI for the given JComponent.

Parameters: c The JComponent to install this UI for.

uninstallComponents

protected void uninstallComponents()
This method uninstalls the sub components for the JDesktopIcon.

uninstallDefaults

protected void uninstallDefaults()
This method uninstalls the defaults for the JDesktopIcon.

uninstallListeners

protected void uninstallListeners()
This method uninstalls the listeners needed by the UI.

uninstallUI

public void uninstallUI(JComponent c)
This method uninstalls the UI for the given JComponent.

Parameters: c The JComponent to uninstall this UI for.