All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.wizards.services.DesktopService
- public interface DesktopService
This API defines the DesktopService, which are
services that relate to the visual GUI for a particular OS. You
can use this API from classes by getting a reference to the service
via the WizardState's getDesktopService() Method.
Then, you can call methods to affect the desktop.
Many methods in this interface take a folderName as an
argument. A folderName is a hierarchical specification of the
desired folder, with each level separated by the character
/. For example:
My Product/Documentation/How To Install
Specifies a folder called "How To Install", which is
nested inside of the "Documentation" folder, which is
itself nested within the "My Product" Folder.
- See Also:
- getDesktopService
-
createDesktopFolder(String)
- Creates a desktop folder
-
createDesktopItem(String, String, String, String)
- Creates a desktop item for the specified command.
-
getNamedFolderList(String, String)
- Gets a list of folders that are in the specified folder.
-
removeDesktopFolder(String)
- Removes a desktop folder.
-
removeDesktopItem(String, String)
- Removes a desktop item.
getNamedFolderList
public abstract String[] getNamedFolderList(String folderName,
String param)
- Gets a list of folders that are in the specified folder.
You can use the names to search recursively through the
folder tree
- Parameters:
- folderName - The name of the folder to search in.
- param - An optional param used by implementations to
specify additional parameters
- Returns:
- The list of items in this folder, or
null if the folder does not exist or is not
readable.
createDesktopItem
public abstract boolean 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.
removeDesktopItem
public abstract boolean removeDesktopItem(String folderName,
String title)
- Removes a desktop item.
- Parameters:
- folderName - The name of the folder that the item to
remove is in.
- title - The name of the item as it appears on-screen.
- Returns:
- Whether the item was removed or not. If the item did
not exist in the first place,
false is returned.
createDesktopFolder
public abstract boolean createDesktopFolder(String folderName)
- Creates a desktop folder
- Parameters:
- folderName - The name of the folder to search in.
- Returns:
- Whether the folder was created or not.
removeDesktopFolder
public abstract boolean removeDesktopFolder(String folderName)
- Removes a desktop folder.
- Parameters:
- folderName - The name of the folder that the folder to
remove is in.
- title - The name of the folder as it appears on-screen.
- Returns:
- Whether the folder was removed or not. If the folder
did not exist in the first place,
false is
returned.
All Packages Class Hierarchy This Package Previous Next Index