Java Doc for 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

All known Subclasses:   com.izforge.izpack.util.os.Win_Shortcut,  com.izforge.izpack.util.os.Unix_Shortcut,
Shortcut
public class Shortcut (Code)
This class represents a shortcut in a operating system independent way. OS specific subclasses are used to implement the necessary mapping from this generic API to the classes that reflect the system dependent AIP.
See Also:   com.izforge.izpack.util.TargetFactory
version:
   0.0.1 / 3/4/02
author:
   Elmar Grom


Field Summary
final public static  intALL_USERS
    
final public static  intAPPLICATIONS
    
final public static  intCURRENT_USER
    
final public static  intDESKTOP
    
final public static  intHIDE
    
final public static  intMAXIMIZED
    
final public static  intMINIMIZED
    
final public static  intNORMAL
     NORMAL = 1 Show the window 'normal' when starting.
final public static  intSTART_MENU
    
final public static  intSTART_UP
    
protected  UninstallDatauninstaller
    


Method Summary
public  voidcleanUp()
     Clean Up Method to do some cleanups after Shortcut Creation.
public  voidexecPostAction()
     Dummy Method especially for the Unix Root User.
public  StringgetBasePath()
     Returns the base path of the shortcut depending on type.
public  BooleangetCreateForAll()
    
public  StringgetDirectoryCreated()
     Subclass implementations return 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()
     Subclass implementations return the fully qualified file name under which the link is saved on disk.
public  intgetHotkey()
    
public  StringgetIconLocation()
    
public  intgetLinkType()
    
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 Programs Folder for the given User.
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  voidsetCategories(String theCategories)
    
public  voidsetCreateForAll(Boolean aCreateForAll)
     Sets the flag which indicates, that this should created for all.
public  voidsetDescription(String description)
     Sets the description string that is used to identify the link in a menu or on the desktop.
public  voidsetEncoding(String string)
    
public  voidsetHotkey(int hotkey)
    
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  voidsetKdeSubstUID(String string)
    
public  voidsetKdeUserName(String string)
    
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  voidsetMimetype(String string)
    
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  voidsetTerminal(String string)
    
public  voidsetTerminalOptions(String string)
    
public  voidsetTryExec(String aTryExec)
     Sets the TryExecField on Unixes.
public  voidsetType(String string)
    
public  voidsetURL(String string)
    
public  voidsetUninstaller(UninstallData theUninstaller)
     Sets the Uninstaller field with the unique Uninstaller Instance.
public  voidsetUserType(int type)
    
public  voidsetWorkingDirectory(String dir)
     Sets the working directory for the link target.
public  booleansupported()
     Determines if a specific instance of this class supports the creation of shortcuts.

Field Detail
ALL_USERS
final public static int ALL_USERS(Code)
ALL_USERS = 2 (identifies the user type as valid for all users)



APPLICATIONS
final public static int APPLICATIONS(Code)
APPLICATIONS = 1



CURRENT_USER
final public static int CURRENT_USER(Code)
CURRENT_USER = 1 (identifies the user type as the current user)



DESKTOP
final public static int DESKTOP(Code)
DESKTOP = 3



HIDE
final public static int HIDE(Code)
HIDE = 0 (Hide the window when starting.)



MAXIMIZED
final public static int MAXIMIZED(Code)
MAXIMIZED = 3 (Show the window maximized when starting.)



MINIMIZED
final public static int MINIMIZED(Code)
MINIMIZED = 2



NORMAL
final public static int NORMAL(Code)
NORMAL = 1 Show the window 'normal' when starting. Usually restores the window properties at the last shut-down.



START_MENU
final public static int START_MENU(Code)
START_MENU = 2



START_UP
final public static int START_UP(Code)
START_UP = 4



uninstaller
protected UninstallData uninstaller(Code)
internal field UninstallData uninstaller





Method Detail
cleanUp
public void cleanUp()(Code)
Clean Up Method to do some cleanups after Shortcut Creation.
currently unused.



execPostAction
public void execPostAction()(Code)
Dummy Method especially for the Unix Root User.



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:   Shortcut.setLinkType(int)
See Also:   Shortcut.setUserType(int)



getCreateForAll
public Boolean getCreateForAll()(Code)
Gets the create for All Flag Returns True if this should be for all.



getDirectoryCreated
public String getDirectoryCreated()(Code)
Subclass implementations return 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. this implementation returns always null.



getFileName
public String getFileName()(Code)
Subclass implementations return 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. An instance of this class returns an empty string. an empty String



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:



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. a Vector of String objects that represent the names ofthe existing program groups. It is theoretically possible that this list is empty.
See Also:   Shortcut.APPLICATIONS
See Also:   Shortcut.START_MENU



getProgramsFolder
public String getProgramsFolder(int current_user)(Code)
Gets the Programs Folder for the given User. This is where to create subfolders or to place or create shortcuts.
Parameters:
  current_user - one of current or all The Foldername or null on unsupported platforms.



getShowCommand
public int getShowCommand()(Code)



getUserType
public int getUserType()(Code)
Gets the user type for the link userType
See Also:   Shortcut.CURRENT_USER
See Also:   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 contructor 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.
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



setCategories
public void setCategories(String theCategories)(Code)
Sets the Categories Field On Unixes
Parameters:
  theCategories - the categories



setCreateForAll
public void setCreateForAll(Boolean aCreateForAll)(Code)
Sets the flag which indicates, that this should created for all.
Parameters:
  aCreateForAll - A Flag - Set to true, if to create for All.



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



setEncoding
public void setEncoding(String string)(Code)
Sets the Encoding
Parameters:
  string -



setHotkey
public void setHotkey(int hotkey)(Code)
Sets the link hotKey
Parameters:
  hotkey -



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.



setKdeSubstUID
public void setKdeSubstUID(String string)(Code)
This sets the setKdeSubstUID
Parameters:
  string - exactly "true" or "false" or nothing



setKdeUserName
public void setKdeUserName(String string)(Code)
This sets the KdeUserName
Parameters:
  string - The UserName



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:

exception:
  IllegalArgumentException - if an an invalid type is passed
throws:
  UnsupportedEncodingException -



setMimetype
public void setMimetype(String string)(Code)
This sets the Mimetype
Parameters:
  string -



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)(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:   Shortcut.getShowCommand



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



setTerminal
public void setTerminal(String string)(Code)
Sets the terminal
Parameters:
  string -



setTerminalOptions
public void setTerminalOptions(String string)(Code)
This sets the terminals-options
Parameters:
  string -



setTryExec
public void setTryExec(String aTryExec)(Code)
Sets the TryExecField on Unixes.
Parameters:
  aTryExec - the try exec command



setType
public void setType(String string)(Code)
This sets the shortcut type
Parameters:
  string -



setURL
public void setURL(String string)(Code)
This sets the URL
Parameters:
  string -



setUninstaller
public void setUninstaller(UninstallData theUninstaller)(Code)
Sets the Uninstaller field with the unique Uninstaller Instance.
Parameters:
  theUninstaller - the unique instance



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



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)
Determines if a specific instance of this class supports the creation of shortcuts. The use of this method might seem odd, since one would not implement a flavor of this class that does not actually support the creation of shortcuts. In other words all flavors will in all probability return true. The only version that can be expected to return false is this class itself, since it has no actual implementation for shortcut creation. This is left to OS specific flavors. If the installer is launched on a unsupported OS there will be no appropriate flavor of this class, which will cause this class itself to be instantiated. The client code can now determine by calling this method if the active OS is supported and take appropriate action. true if the creation of shortcuts is supported, falseif this is not supported.



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.