Servertec
Foundation Classes
1.3.3 09/04/2005

stec.sfc.Win32
Class Shortcut

java.lang.Object
  extended by stec.sfc.Win32.Shortcut

public final class Shortcut
extends java.lang.Object

Used to create, modifiy, load and save shortcut link objects.

Since:
1.0.0 01/07/2001

Field Summary
static int MAXIMIZED
          Activate and display window maximized.
static int MINIMIZED
          Activate and display window minimized.
static int NORMAL
          Activate and display window.
 
Constructor Summary
Shortcut()
           
 
Method Summary
 java.lang.String getArguments()
          Returns the command-line arguments associated with the shortcut link object.
 java.lang.String getDescription()
          Returns any description associated with the shortcut link object.
 int getHotKey()
          Returns any hot key modifiers associated with the shortcut link object.
 int getIconIndex()
          Returns the index of any icon image associated with the shortcut link object.
 java.lang.String getIconPath()
          Returns the path to any icon image associated with the shortcut link object.
 int getShowWindow()
          Returns the show window flag associated with the shortcut link object.
 java.lang.String getTarget()
          Returns the path to the target of the shortcut link object.
 java.lang.String getWorkingDirectory()
          Returns the working directory associated with the shortcut link object.
 void load(java.lang.String filename)
          Loads the shortcut link object from the specified shortcut link file.
 void reset()
          Resets all fields to their original values.
 void save(java.lang.String filename)
          Saves the shortcut link object to the specified shortcut link file.
 void setArguments(java.lang.String arguments)
          Sets the command-line arguments.
 void setDescription(java.lang.String description)
          Sets the description.
 void setHotKey(int hot_key)
          Sets the hot key modifiers.
 void setIconIndex(int icon_index)
          Sets the index of the icon image.
 void setIconPath(java.lang.String icon_path)
          Sets the path to the icon image.
 void setShowWindow(int show_window)
          Sets the show window flag.
 void setTarget(java.lang.String target)
          Sets the path to the target.
 void setWorkingDirectory(java.lang.String working_directory)
          Sets the path to the working directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
Activate and display window.

Set to SW_SHOWNORMAL.


MAXIMIZED

public static final int MAXIMIZED
Activate and display window maximized.

Set to SW_SHOWMAXIMIZED.


MINIMIZED

public static final int MINIMIZED
Activate and display window minimized.

Set to SW_SHOWMINNOACTIVE.

Constructor Detail

Shortcut

public Shortcut()
Method Detail

load

public final void load(java.lang.String filename)
                throws Win32Exception
Loads the shortcut link object from the specified shortcut link file.

If load() fails the shortcut link if left in an unknown state.

Parameters:
filename - the name of the shortcut link file to load.
Throws:
Win32Exception - if any error occurs.

save

public final void save(java.lang.String filename)
                throws Win32Exception
Saves the shortcut link object to the specified shortcut link file.

Target attribute must be set before saving the shorcut link . All other attributes are optional.

Parameters:
filename - the name of the shortcut link file.
Throws:
Win32Exception - if any error occurs.

getArguments

public final java.lang.String getArguments()
Returns the command-line arguments associated with the shortcut link object.

Returns:
the command-line arguments.

getDescription

public final java.lang.String getDescription()
Returns any description associated with the shortcut link object.

Returns:
the description.

getHotKey

public final int getHotKey()
Returns any hot key modifiers associated with the shortcut link object.

Returns:
the hot key modifiers.

May include HotKeyModifier.


getIconPath

public final java.lang.String getIconPath()
Returns the path to any icon image associated with the shortcut link object.

Returns:
the path to the icon image.

getIconIndex

public final int getIconIndex()
Returns the index of any icon image associated with the shortcut link object.

Returns:
the index to the icon image.

getTarget

public final java.lang.String getTarget()
Returns the path to the target of the shortcut link object.

Returns:
the path to the target.

getWorkingDirectory

public final java.lang.String getWorkingDirectory()
Returns the working directory associated with the shortcut link object.

Returns:
the working directory.

getShowWindow

public final int getShowWindow()
Returns the show window flag associated with the shortcut link object.

Returns:
the show window flags.

setArguments

public final void setArguments(java.lang.String arguments)
Sets the command-line arguments.

Parameters:
arguments - the command-line arguments.

setDescription

public final void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - the description.

setHotKey

public final void setHotKey(int hot_key)
Sets the hot key modifiers.

Parameters:
hot_key - the hot key modifiers.

setIconPath

public final void setIconPath(java.lang.String icon_path)
Sets the path to the icon image.

Parameters:
icon_path - the path to the icon image.

setIconIndex

public final void setIconIndex(int icon_index)
Sets the index of the icon image.

Parameters:
icon_index - the index of the icon image.

setTarget

public final void setTarget(java.lang.String target)
Sets the path to the target.

Parameters:
target - the path to the target.

The existing object that the shortcut link will point to.


setWorkingDirectory

public final void setWorkingDirectory(java.lang.String working_directory)
Sets the path to the working directory.

Parameters:
working_directory - the path to the working directory.

setShowWindow

public final void setShowWindow(int show_window)
Sets the show window flag.

Parameters:
show_window - the show window flag.

reset

public final void reset()
Resets all fields to their original values.


Servertec
Foundation Classes
1.3.3 09/04/2005

Copyright © 2001-2005 Servertec. All rights reserved.