planetj.shortcuts
Class InternetShortcut

java.lang.Object
  |
  +--planetj.shortcuts.InternetShortcut
All Implemented Interfaces:
IShortcut

public class InternetShortcut
extends Object
implements IShortcut

An Internet shortcut is basically a text file then ends with .url For Example PlanetJ.url shortcut might look like this [InternetShortcut] URL=http://www.planetjavainc.com/ or you can point it to a file like this [InternetShortcut] URL=file://c:/Temp/Runnable.exe Creation date: (5/26/2003 3:00:06 PM)


Field Summary
static String EXTENSION
           
 
Constructor Summary
InternetShortcut()
          InternetShortcut constructor comment.
InternetShortcut(String pFileName, String pURL)
          InternetShortcut constructor comment.
InternetShortcut(String pFileName, String pURL, int pIconIndex, String pIconFile)
          InternetShortcut constructor comment.
 
Method Summary
 String getFileName()
          This will be the file name of the shortcut.
 String getIconFile()
          Returns the Icon file destination String EX: C:\Temp\PlanetJ.ico Creation date: (5/26/2003 3:02:41 PM)
 int getIconIndex()
          The Icon index is the index of the icon you want to use This is only appropriate when you are using a .exe that contains many icons Creation date: (5/26/2003 3:02:41 PM)
 String getLeadingDirectories()
          This will return a String of the leading directories before the FileName For instance if the file name is \\PlanetJ\\WOW\\WOW.url, this would return \\PlanetJ\\WOW\\ Creation date: (5/26/2003 5:47:48 PM)
 String getURL()
          must be the file or URL in url format Example of URL = "http://www.planetjavainc.com/" Example of file = "file://c:/Temp/Runnable.exe" Creation date: (5/26/2003 3:02:41 PM)
 void setFileName(String newFileName)
          This will be the file name of the shortcut.
 void setIconFile(String newIconFile)
          Sets the Icon file destination String EX: C:\Temp\PlanetJ.ico Creation date: (5/26/2003 3:02:41 PM)
 void setIconIndex(int newIconIndex)
          The Icon index is the index of the icon you want to use This is only appropriate when you are using a .exe that contains many icons Creation date: (5/26/2003 3:02:41 PM)
 void setURL(String newURL)
          must be the file or URL in url format Example of URL = "http://www.planetjavainc.com/" Example of file = "file://c:/Temp/Runnable.exe" Creation date: (5/26/2003 3:02:41 PM)
 String toString()
          This method will return the string that is the shortcut file's text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION

public static final String EXTENSION
See Also:
Constant Field Values
Constructor Detail

InternetShortcut

public InternetShortcut()
InternetShortcut constructor comment.


InternetShortcut

public InternetShortcut(String pFileName,
                        String pURL)
InternetShortcut constructor comment.


InternetShortcut

public InternetShortcut(String pFileName,
                        String pURL,
                        int pIconIndex,
                        String pIconFile)
InternetShortcut constructor comment.

Method Detail

getFileName

public String getFileName()
This will be the file name of the shortcut. EX: PlanetJ.url

**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 5:47:48 PM)

Specified by:
getFileName in interface IShortcut
Returns:
java.lang.String

getIconFile

public String getIconFile()
Returns the Icon file destination String EX: C:\Temp\PlanetJ.ico Creation date: (5/26/2003 3:02:41 PM)

Specified by:
getIconFile in interface IShortcut
Returns:
java.lang.String

getIconIndex

public int getIconIndex()
The Icon index is the index of the icon you want to use This is only appropriate when you are using a .exe that contains many icons Creation date: (5/26/2003 3:02:41 PM)

Specified by:
getIconIndex in interface IShortcut
Returns:
int

getLeadingDirectories

public String getLeadingDirectories()
This will return a String of the leading directories before the FileName For instance if the file name is \\PlanetJ\\WOW\\WOW.url, this would return \\PlanetJ\\WOW\\ Creation date: (5/26/2003 5:47:48 PM)

Specified by:
getLeadingDirectories in interface IShortcut
Returns:
java.lang.String

getURL

public String getURL()
must be the file or URL in url format Example of URL = "http://www.planetjavainc.com/" Example of file = "file://c:/Temp/Runnable.exe" Creation date: (5/26/2003 3:02:41 PM)

Specified by:
getURL in interface IShortcut
Returns:
java.lang.String

setFileName

public void setFileName(String newFileName)
This will be the file name of the shortcut. EX: PlanetJ.url

**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 5:47:48 PM)

Parameters:
newFileName - java.lang.String

setIconFile

public void setIconFile(String newIconFile)
Sets the Icon file destination String EX: C:\Temp\PlanetJ.ico Creation date: (5/26/2003 3:02:41 PM)

Parameters:
newIconFile - java.lang.String

setIconIndex

public void setIconIndex(int newIconIndex)
The Icon index is the index of the icon you want to use This is only appropriate when you are using a .exe that contains many icons Creation date: (5/26/2003 3:02:41 PM)

Parameters:
newIconIndex - int

setURL

public void setURL(String newURL)
must be the file or URL in url format Example of URL = "http://www.planetjavainc.com/" Example of file = "file://c:/Temp/Runnable.exe" Creation date: (5/26/2003 3:02:41 PM)

Parameters:
newURL - java.lang.String

toString

public String toString()
This method will return the string that is the shortcut file's text. Creation date: (5/26/2003 3:22:13 PM)

Specified by:
toString in interface IShortcut
Overrides:
toString in class Object