|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.program.Program
public final class Program
Instances of this class represent programs and their associated file extensions in the operating system.
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
boolean |
execute(java.lang.String fileName)
Executes the program with the file as the single argument in the operating system. |
static Program |
findProgram(java.lang.String extension)
Finds the program that is associated with an extension. |
static java.lang.String[] |
getExtensions()
Answer all program extensions in the operating system. |
ImageData |
getImageData()
Returns the receiver's image data. |
java.lang.String |
getName()
Returns the receiver's name. |
static Program[] |
getPrograms()
Answers all available programs in the operating system. |
int |
hashCode()
Returns an integer hash code for the receiver. |
static boolean |
launch(java.lang.String fileName)
Launches the operating system executable associated with the file or URL (http:// or https://). |
static boolean |
launch(java.lang.String fileName,
java.lang.String workingDir)
Launches the operating system executable associated with the file or URL (http:// or https://). |
java.lang.String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Program findProgram(java.lang.String extension)
Display must already exist to guarantee that
this method returns an appropriate result.
extension - the program extension
null
java.lang.IllegalArgumentException - public static java.lang.String[] getExtensions()
Display must already exist to guarantee
that this method returns an appropriate result.
public static Program[] getPrograms()
Display must already exist to guarantee
that this method returns an appropriate result.
public static boolean launch(java.lang.String fileName)
Display must already
exist to guarantee that this method returns an appropriate result.
fileName - the file or program name or URL (http:// or https://)
true if the file is launched, otherwise false
java.lang.IllegalArgumentException -
public static boolean launch(java.lang.String fileName,
java.lang.String workingDir)
workingDir exists and
fileName is an executable.
Note that a Display must already exist to guarantee
that this method returns an appropriate result.
fileName - the file name or program name or URL (http:// or https://)workingDir - the name of the working directory or null
true if the file is launched, otherwise false
java.lang.IllegalArgumentException - public boolean execute(java.lang.String fileName)
fileName - the file or program name
true if the file is launched, otherwise false
java.lang.IllegalArgumentException - public ImageData getImageData()
public java.lang.String getName()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the object to compare with this object
true if the object is the same as this object and false otherwisehashCode()public int hashCode()
true when passed to
equals must return the same value for this
method.
hashCode in class java.lang.Objectequals(Object)public java.lang.String toString()
toString in class java.lang.Object
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.