All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.products.DesktopUnit

java.lang.Object
   |
   +----com.sun.install.products.InstallComponent
           |
           +----com.sun.install.products.InstallLeaf
                   |
                   +----com.sun.install.products.DesktopUnit

public class DesktopUnit
extends InstallLeaf
The DesktopUnit is able to add icon associations to the user's desktop, based on the the "DesktopItems" property.


Constructor Index

 o DesktopUnit()
Create an empty DesktopUnit

Method Index

 o addRuntimeResources(Vector)
Add the runtime resources required by this class.
 o countInstallable()
Counts the number of installables in this Component.
 o countUninstallable()
Counts the number of uninstallables in this Component.
 o createDesktopItem(String, String, String, String)
Creates a desktop item for the specified command.
 o toString()
Represent this object as a string.

Constructors

 o DesktopUnit
 public DesktopUnit()
Create an empty DesktopUnit

Methods

 o createDesktopItem
 public void createDesktopItem(String folderName,
                               String title,
                               String command,
                               String iconName)
Creates a desktop item for the specified command. For example, on Microsoft Windows, an icon is placed on the "Start" menu.

Parameters:
folderName - The name of the folder to search in.
title - The name of the item as it should appear on-screen.
command - The platform-specific command to activate when this desktop item is selected by the user.
iconPath - The absolute path To the file representing the icon. The icon file format should be the correct one for the platform. For example, on Sun Solaris, the icon must be in .xpm format. If no icon name is supplied, none is used, or the default one is used for the supplied command.
Returns:
Whether the item was able to be added or not.
 o countInstallable
 public int countInstallable()
Counts the number of installables in this Component. Used to determine how many divisions of the progress bar there is. Since the DesktopUnit does not do any work during install, this method returns 0.

Returns:
The number of installables of this Leaf. Default is 1.
Overrides:
countInstallable in class InstallLeaf
 o countUninstallable
 public int countUninstallable()
Counts the number of uninstallables in this Component. Used to determine how many divisions of the progress bar there is. Since the DesktopUnit does no work during uninstall, this method returns 0.

Returns:
The number of uninstallables of this Leaf. Default is 1.
Overrides:
countUninstallable in class InstallLeaf
 o toString
 public String toString()
Represent this object as a string.

Returns:
A description of this object.
Overrides:
toString in class InstallComponent
 o addRuntimeResources
 public void addRuntimeResources(Vector resourceVector)
Add the runtime resources required by this class.

Parameters:
resourceVector - The vector containing all of the required resources for this class
Overrides:
addRuntimeResources in class InstallLeaf

All Packages  Class Hierarchy  This Package  Previous  Next  Index