planetj.shortcuts
Class ShortcutGenerator

java.lang.Object
  extended byplanetj.shortcuts.ShortcutGenerator

public class ShortcutGenerator
extends java.lang.Object

This class is resposible for generating files in your start menu, desktop, or anywhere else you wish. Creation date: (5/26/2003 3:30:49 PM)


Field Summary
static java.lang.String ADMINISTRATOR
           
static java.lang.String ALL_USERS
           
static java.lang.String DEFAULT_USER
           
static java.lang.String DESKTOP
           
static java.lang.String GUEST
           
static java.lang.String START_MENU
           
 
Method Summary
static boolean generateDesktopShortcut(IShortcut pShortcut)
          This method will generate a shortcut on your desktop.
static boolean generateShortcut(IShortcut pShortcut)
          This method will generate a shortcut on your file system.
static boolean generateStartMenuShortcut(IShortcut pShortcut)
          This method will generate a shortcut on your start menu.
static java.lang.String getCurrentUserHome()
           
static java.lang.String getCurrentUserName()
           
static java.lang.String getDesktopRootDirectory()
          Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)
static java.lang.String getDesktopRootDirectory(java.lang.String usersFolder)
          Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)
static java.lang.String getStartMenuRootDirectory()
          Returns a String that points to this systems start menu directory Creation date: (5/26/2003 3:34:20 PM)
static java.lang.String getStartMenuRootDirectory(java.lang.String usersFolder)
          Returns a String that points to this systems start menu directory Creation date: (5/26/2003 3:34:20 PM)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESKTOP

public static final java.lang.String DESKTOP
See Also:
Constant Field Values

START_MENU

public static final java.lang.String START_MENU
See Also:
Constant Field Values

ALL_USERS

public static final java.lang.String ALL_USERS
See Also:
Constant Field Values

DEFAULT_USER

public static final java.lang.String DEFAULT_USER
See Also:
Constant Field Values

ADMINISTRATOR

public static final java.lang.String ADMINISTRATOR
See Also:
Constant Field Values

GUEST

public static final java.lang.String GUEST
See Also:
Constant Field Values
Method Detail

generateDesktopShortcut

public static boolean generateDesktopShortcut(IShortcut pShortcut)
                                       throws CMException
This method will generate a shortcut on your desktop. Example InternetShortcut is = new InternetShortcut("PJ.url","http://www.planetjavainc.com"); ShortcutGenerator.generateDesktopShortcut(is);

**NOTE** If you want a file to go in Desktop\\XXFolder\\XXFile.url, You have to give the IShortcut a File name of XXFolder\\XXFile.url, Creation date: (5/26/2003 6:13:22 PM)

Throws:
CMException

generateShortcut

public static boolean generateShortcut(IShortcut pShortcut)
                                throws CMException
This method will generate a shortcut on your file system. Example InternetShortcut is = new InternetShortcut("PJ.url","http://www.planetjavainc.com"); ShortcutGenerator.generateStartMenuShortcut(is);

Creation date: (5/26/2003 6:13:22 PM)

Throws:
CMException

generateStartMenuShortcut

public static boolean generateStartMenuShortcut(IShortcut pShortcut)
                                         throws CMException
This method will generate a shortcut on your start menu. Example InternetShortcut is = new InternetShortcut("PJ.url","http://www.planetjavainc.com"); ShortcutGenerator.generateStartMenuShortcut(is);

**NOTE** If you want a file to go in Start menu\\Programs\\XXFolder\\XXFile.url, You have to give the IShortcut a File name of \\Programs\\XXFolder\\XXFile.url, Creation date: (5/26/2003 6:13:22 PM)

Throws:
CMException

getCurrentUserHome

public static java.lang.String getCurrentUserHome()
See Also:
Creation date: (5/28/2003 9:47:20 AM)

getCurrentUserName

public static java.lang.String getCurrentUserName()
See Also:
Creation date: (5/28/2003 9:47:20 AM)

getDesktopRootDirectory

public static java.lang.String getDesktopRootDirectory()
Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)


getDesktopRootDirectory

public static java.lang.String getDesktopRootDirectory(java.lang.String usersFolder)
Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)

See Also:
returns the folder of the current user

getStartMenuRootDirectory

public static java.lang.String getStartMenuRootDirectory()
Returns a String that points to this systems start menu directory Creation date: (5/26/2003 3:34:20 PM)


getStartMenuRootDirectory

public static java.lang.String getStartMenuRootDirectory(java.lang.String usersFolder)
Returns a String that points to this systems start menu directory Creation date: (5/26/2003 3:34:20 PM)

See Also:
returns the folder of the current user