|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.win32.shell.ShellLink
public class ShellLink
ShellLink class is a utility for creating links using the createLink(java.io.File, java.io.File, java.lang.String)
function.
Constructor Summary | |
---|---|
ShellLink(java.io.File linkFile)
Creates an instance of ShellLink class for editing specified link file. |
|
ShellLink(java.io.File linkFile,
java.io.File sourceFile)
Creates an instance of ShellLink class for editing specified link file. |
Method Summary | |
---|---|
static void |
createLink(java.io.File sourceFile,
java.io.File linkFile,
java.lang.String comment)
The createLink function creates a link for a specified file. |
java.lang.String |
getArguments()
|
java.lang.String |
getDescription()
|
int |
getIconIndex()
|
java.lang.String |
getIconPath()
|
java.io.File |
getLinkFile()
|
java.io.File |
getSourceFile()
|
java.lang.String |
getWorkingDirectory()
Returns the working directory of this object. |
static java.lang.String |
resolveLink(java.io.File linkFile)
The resolveLink function resolves the file name from the specified link file. |
void |
setArguments(java.lang.String arguments)
|
void |
setDescription(java.lang.String description)
|
void |
setIconPath(java.io.File iconFile,
int iconIndex)
|
void |
setSourceFile(java.io.File sourceFile)
|
void |
setWorkingDirectory(java.lang.String value)
Specifies the working directory for this object. |
static void |
updateShellLink(java.io.File linkFile,
java.lang.String description,
java.io.File iconFile,
java.lang.String arguments)
This function updates attributes of the link file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShellLink(java.io.File linkFile)
ShellLink
class for editing specified link file.
If the link file does not exist the constructor
throws IllegalArgumentException
.
NOTE: Because this class uses COM interfaces,
it assumes that COM was initialized (using ComFunctions.coInitialize()
,for example).
linkFile
- File object that contains link file for editing.public ShellLink(java.io.File linkFile, java.io.File sourceFile) throws java.io.IOException
ShellLink
class for editing specified link file.
If the link file does not exist it will be created.
Link object sets to sourceFile
.
NOTE: Because this class uses COM interfaces,
it assumes that COM was initialized (using ComFunctions.coInitialize()
,for example).
linkFile
- File object that contains link file for editing.sourceFile
- File object that contains link object.
java.io.IOException
Method Detail |
---|
public java.io.File getLinkFile()
public void setSourceFile(java.io.File sourceFile)
public java.io.File getSourceFile()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setIconPath(java.io.File iconFile, int iconIndex)
public java.lang.String getIconPath()
public int getIconIndex()
public void setArguments(java.lang.String arguments)
public java.lang.String getArguments()
public java.lang.String getWorkingDirectory()
public void setWorkingDirectory(java.lang.String value)
value
- new working directorypublic static void createLink(java.io.File sourceFile, java.io.File linkFile, java.lang.String comment)
IShellLink
and IPersistFile
interfaces to create and store a shortcut to the specified file.
ComFunctions.coInitialize()
,for example).
sourceFile
- source file.linkFile
- link file to be created.comment
- comment for a new link.public static java.lang.String resolveLink(java.io.File linkFile)
ComFunctions.coInitialize()
for example).
linkFile
- source link (*.lnk) file.
public static void updateShellLink(java.io.File linkFile, java.lang.String description, java.io.File iconFile, java.lang.String arguments)
linkFile
- the link file itself.description
- new description for the link.iconFile
- new icon file for the link.arguments
- arguments for the link.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |