Java Doc for Win_Shortcut.java in  » Installer » IzPack » com » izforge » izpack » util » os » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Installer » IzPack » com.izforge.izpack.util.os 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.izforge.izpack.util.os.Shortcut
      com.izforge.izpack.util.os.Win_Shortcut

Win_Shortcut
public class Win_Shortcut extends Shortcut (Code)
This is the Microsoft Windows specific implementation of Shortcut.
version:
   0.0.1 / 3/4/02
author:
   Elmar Grom




Method Summary
public  StringgetBasePath()
     Returns the base path of the shortcut depending on type.
public  StringgetDirectoryCreated()
     Returns the path of the directory where the link file is stored, if it was necessary during the previous save operation to create the directory.
public  StringgetFileName()
     Returns the fully qualified file name under which the link is saved on disk.
public  intgetHotkey()
    
public  StringgetIconLocation()
    
public  intgetLinkType()
     Gets the type of link types are:
maps from ShellLink-types to Shortcut-types.
public  Vector<String>getProgramGroups(int userType)
     Returns a list of currently existing program groups, based on the requested type.
public  StringgetProgramsFolder(int current_user)
     Gets the Folders where to place the program-groups and their shortcuts, for the given usertype.
public  intgetShowCommand()
    
public  intgetUserType()
    
public  StringgetWorkingDirectory()
     Gets the working directory for the link target.
public  voidinitialize(int type, String name)
     This method initializes the object.
public  booleanmultipleUsers()
     Returns true if the target OS supports current user and all users.
public  voidsave()
     Saves this link.
public  voidsetArguments(String arguments)
     Sets the command line arguments that will be passed to the target when the link is activated.
public  voidsetDescription(String description)
     Sets the description string that is used to identify the link in a menu or on the desktop.
public  voidsetHotkey(int hotkey)
     Sets the link hotKey
Parameters:
  hotkey - incoming 2 byte hotkey is: high byte modifier: SHIFT = 0x01 CONTROL= 0x02 ALT = 0x04 EXT =0x08lower byte contains ascii letter.
public  voidsetIconLocation(String path, int index)
     Sets the location of the icon that is shown for the shortcut on the desktop.
Parameters:
  path - a fully qualified file name of a file that contains the icon.
Parameters:
  index - the index of the specific icon to use in the file.
public  voidsetLinkName(String name)
     Sets the name shown in a menu or on the desktop for the link.
Parameters:
  name - The name that the link should display on a menu or on the desktop.
public  voidsetLinkType(int type)
     Sets the type of link
Parameters:
  type - The type of link desired.
public  voidsetProgramGroup(String groupName)
     Sets the name of the program group this ShellLinbk should be placed in.
public  voidsetShowCommand(int show)
     Sets the show command that is passed to the target application when the link is activated. The show command determines if the the window will be restored to the previous size, minimized, maximized or visible at all.
public  voidsetTargetPath(String path)
     Sets the absolute path to the shortcut target.
public  voidsetUserType(int type)
    
public  voidsetWorkingDirectory(String dir)
     Sets the working directory for the link target.
public  booleansupported()
     Signals that this flavor of com.izforge.izpack.util.os.Shortcut supports the creation of shortcuts.



Method Detail
getBasePath
public String getBasePath() throws Exception(Code)
Returns the base path of the shortcut depending on type. The base path is the directory that the short cut, (or its program group) will be created in. For instance, on Windows NT, a shortcut with user-type ALL_USERS, and link-type DESKTOP might have the base path "C:\Program Files\All Users\Desktop"
See Also:   Win_Shortcut.setLinkType(int)
See Also:   Win_Shortcut.setUserType(int)
See Also:   translates from ShellLink-UserTypes to Shortcut-UserTypes.



getDirectoryCreated
public String getDirectoryCreated()(Code)
Returns the path of the directory where the link file is stored, if it was necessary during the previous save operation to create the directory. This method returns null if no save operation was carried out or there was no need to create a directory during the previous save operation. the path of the directory where the link file is stored or null if nosave operation was carried out or there was no need to create a directory during the previoussave operation.



getFileName
public String getFileName()(Code)
Returns the fully qualified file name under which the link is saved on disk. Note: this method returns valid results only if the instance was created from a file on disk or after a successful save operation. the fully qualified file name for the shell link



getHotkey
public int getHotkey()(Code)
Gets the link hotKey int hotKey



getIconLocation
public String getIconLocation()(Code)
returns icon Location iconLocation



getLinkType
public int getLinkType()(Code)
Gets the type of link types are:
maps from ShellLink-types to Shortcut-types.



getProgramGroups
public Vector<String> getProgramGroups(int userType)(Code)
Returns a list of currently existing program groups, based on the requested type. For example if the type is APPLICATIONS then all the names of the program groups in the Start Menu\Programs menu would be returned.
Parameters:
  userType - the type of user for the program group set. (as Shortcut.utype) a Vector of String objects that represent the names ofthe existing program groups. It is theoretically possible that this list is empty.
See Also:   Win_Shortcut.APPLICATIONS
See Also:   Win_Shortcut.START_MENU



getProgramsFolder
public String getProgramsFolder(int current_user)(Code)
Gets the Folders where to place the program-groups and their shortcuts, for the given usertype.
See Also:   com.izforge.izpack.util.os.Shortcut.getProgramsFolder(int)



getShowCommand
public int getShowCommand()(Code)



getUserType
public int getUserType()(Code)
Gets the user type for the link userType
See Also:   Win_Shortcut.CURRENT_USER
See Also:   Win_Shortcut.ALL_USERS



getWorkingDirectory
public String getWorkingDirectory()(Code)
Gets the working directory for the link target. the working directory.



initialize
public void initialize(int type, String name) throws Exception(Code)
This method initializes the object. It is used as a replacement for the constructor because of the way it is instantiated through the TargetFactory.
Parameters:
  type - the type or classification of the program group in which the link should exist.The following types are recognized:

Parameters:
  name - the name of the shortcut.



multipleUsers
public boolean multipleUsers()(Code)
Returns true if the target OS supports current user and all users. true if the target OS supports current and all users.



save
public void save() throws Exception(Code)
Saves this link.
exception:
  Exception - if problems are encountered



setArguments
public void setArguments(String arguments)(Code)
Sets the command line arguments that will be passed to the target when the link is activated.
Parameters:
  arguments - the command line arguments



setDescription
public void setDescription(String description)(Code)
Sets the description string that is used to identify the link in a menu or on the desktop.
Parameters:
  description - the descriptiojn string



setHotkey
public void setHotkey(int hotkey)(Code)
Sets the link hotKey
Parameters:
  hotkey - incoming 2 byte hotkey is: high byte modifier: SHIFT = 0x01 CONTROL= 0x02 ALT = 0x04 EXT =0x08lower byte contains ascii letter. ie 0x0278 represents CTRL+x 0x068a represents CTRL+ALT+z



setIconLocation
public void setIconLocation(String path, int index)(Code)
Sets the location of the icon that is shown for the shortcut on the desktop.
Parameters:
  path - a fully qualified file name of a file that contains the icon.
Parameters:
  index - the index of the specific icon to use in the file. If there is only one icon inthe file, use an index of 0.



setLinkName
public void setLinkName(String name)(Code)
Sets the name shown in a menu or on the desktop for the link.
Parameters:
  name - The name that the link should display on a menu or on the desktop. Do not includea file extension.



setLinkType
public void setLinkType(int type) throws IllegalArgumentException, UnsupportedEncodingException(Code)
Sets the type of link
Parameters:
  type - The type of link desired. The following values can be set:
(note APPLICATION on Windows is 'Start Menu\Programs') APPLICATION is a Mac term.
exception:
  IllegalArgumentException - if an an invalid type is passed
throws:
  UnsupportedEncodingException -



setProgramGroup
public void setProgramGroup(String groupName)(Code)
Sets the name of the program group this ShellLinbk should be placed in.
Parameters:
  groupName - the name of the program group



setShowCommand
public void setShowCommand(int show) throws IllegalArgumentException(Code)
Sets the show command that is passed to the target application when the link is activated. The show command determines if the the window will be restored to the previous size, minimized, maximized or visible at all.

Note:
Using HIDE will cause the target window not to show at all. There is not even a button on the taskbar. This is a very useful setting when batch files are used to launch a Java application as it will then appear to run just like any native Windows application.

Parameters:
  show - the show command. Valid settings are:

See Also:   Win_Shortcut.getShowCommand
See Also:    internally maps from Shortcut. to ShellLink.



setTargetPath
public void setTargetPath(String path)(Code)
Sets the absolute path to the shortcut target.
Parameters:
  path - the fully qualified file name of the target



setUserType
public void setUserType(int type)(Code)
Sets the user type for the link
Parameters:
  type - the type of user for the link.
See Also:   Shortcut.CURRENT_USER
See Also:   Shortcut.ALL_USERS
See Also:   if the linkPath for that type is empty, refuse to set.



setWorkingDirectory
public void setWorkingDirectory(String dir)(Code)
Sets the working directory for the link target.
Parameters:
  dir - the working directory



supported
public boolean supported()(Code)
Signals that this flavor of com.izforge.izpack.util.os.Shortcut supports the creation of shortcuts. always true



Fields inherited from com.izforge.izpack.util.os.Shortcut
final public static int ALL_USERS(Code)(Java Doc)
final public static int APPLICATIONS(Code)(Java Doc)
final public static int CURRENT_USER(Code)(Java Doc)
final public static int DESKTOP(Code)(Java Doc)
final public static int HIDE(Code)(Java Doc)
final public static int MAXIMIZED(Code)(Java Doc)
final public static int MINIMIZED(Code)(Java Doc)
final public static int NORMAL(Code)(Java Doc)
final public static int START_MENU(Code)(Java Doc)
final public static int START_UP(Code)(Java Doc)
protected UninstallData uninstaller(Code)(Java Doc)

Methods inherited from com.izforge.izpack.util.os.Shortcut
public void cleanUp()(Code)(Java Doc)
public void execPostAction()(Code)(Java Doc)
public String getBasePath() throws Exception(Code)(Java Doc)
public Boolean getCreateForAll()(Code)(Java Doc)
public String getDirectoryCreated()(Code)(Java Doc)
public String getFileName()(Code)(Java Doc)
public int getHotkey()(Code)(Java Doc)
public String getIconLocation()(Code)(Java Doc)
public int getLinkType()(Code)(Java Doc)
public Vector<String> getProgramGroups(int userType)(Code)(Java Doc)
public String getProgramsFolder(int current_user)(Code)(Java Doc)
public int getShowCommand()(Code)(Java Doc)
public int getUserType()(Code)(Java Doc)
public String getWorkingDirectory()(Code)(Java Doc)
public void initialize(int type, String name) throws Exception(Code)(Java Doc)
public boolean multipleUsers()(Code)(Java Doc)
public void save() throws Exception(Code)(Java Doc)
public void setArguments(String arguments)(Code)(Java Doc)
public void setCategories(String theCategories)(Code)(Java Doc)
public void setCreateForAll(Boolean aCreateForAll)(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setEncoding(String string)(Code)(Java Doc)
public void setHotkey(int hotkey)(Code)(Java Doc)
public void setIconLocation(String path, int index)(Code)(Java Doc)
public void setKdeSubstUID(String string)(Code)(Java Doc)
public void setKdeUserName(String string)(Code)(Java Doc)
public void setLinkName(String name)(Code)(Java Doc)
public void setLinkType(int type) throws IllegalArgumentException, UnsupportedEncodingException(Code)(Java Doc)
public void setMimetype(String string)(Code)(Java Doc)
public void setProgramGroup(String groupName)(Code)(Java Doc)
public void setShowCommand(int show)(Code)(Java Doc)
public void setTargetPath(String path)(Code)(Java Doc)
public void setTerminal(String string)(Code)(Java Doc)
public void setTerminalOptions(String string)(Code)(Java Doc)
public void setTryExec(String aTryExec)(Code)(Java Doc)
public void setType(String string)(Code)(Java Doc)
public void setURL(String string)(Code)(Java Doc)
public void setUninstaller(UninstallData theUninstaller)(Code)(Java Doc)
public void setUserType(int type)(Code)(Java Doc)
public void setWorkingDirectory(String dir)(Code)(Java Doc)
public boolean supported()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.