planetj.shortcuts
Class ShortcutGenerator

java.lang.Object
  |
  +--planetj.shortcuts.ShortcutGenerator

public class ShortcutGenerator
extends 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 String ADMINISTRATOR
           
static String ALL_USERS
           
static String DEFAULT_USER
           
static String DESKTOP
           
static String GUEST
           
static 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 String getCurrentUserHome()
           
static String getCurrentUserName()
           
static String getDesktopRootDirectory()
          Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)
static String getDesktopRootDirectory(String usersFolder)
          Returns a String that points to this systems desktop directory Creation date: (5/26/2003 3:34:20 PM)
static String getStartMenuRootDirectory()
          Returns a String that points to this systems start menu directory Creation date: (5/26/2003 3:34:20 PM)
static String getStartMenuRootDirectory(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 String DESKTOP
See Also:
Constant Field Values

START_MENU

public static final String START_MENU
See Also:
Constant Field Values

ALL_USERS

public static final String ALL_USERS
See Also:
Constant Field Values

DEFAULT_USER

public static final String DEFAULT_USER
See Also:
Constant Field Values

ADMINISTRATOR

public static final String ADMINISTRATOR
See Also:
Constant Field Values

GUEST

public static final 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)

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)

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)

CMException

getCurrentUserHome

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

getCurrentUserName

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

getDesktopRootDirectory

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


getDesktopRootDirectory

public static String getDesktopRootDirectory(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 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 String getStartMenuRootDirectory(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