|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--shell.Environment
A thread that will create the commandline prompt for the user For example:
Window win = new Window(parent);
win.show();
Terminal,
ProcessController| Field Summary | |
static java.lang.String |
RUNTIME_COMMAND_PACKAGE
|
| Method Summary | |
void |
doCommand(java.lang.String cmd)
Runs a command represented by the String passed into the method. |
void |
executeCommand(java.util.Vector cmd,
java.lang.String strcmd)
-------- Deprecated ------------ Use doCommand() instead. |
java.util.Hashtable |
getAllEnvironmentVariables()
Returns a handle to the Environment object's envVariable Hashtable which contains all the current registered env variables. |
java.lang.Object[] |
getAutoComplete(java.lang.String toMatch)
This method takes in a string, then compares all files in the current directory to the string, putting the matching names into an ArrayList. |
java.lang.Object[] |
getAutoComplete(java.lang.String location,
java.lang.String toMatch)
This method takes in two strings, one representing the location of the directory to list the contents of, the other is the text to match. |
java.io.File |
getCurrentLocation()
Static method that allows objects within the shell to obtain the current working directory. |
static Environment |
getEnvironment()
This method returns the current single instance of the Environment object. |
java.lang.String |
getEnvironmentVariable(java.lang.String name)
Takes in a string and checks if it is a valid environment variable. |
java.io.PrintStream |
getStandardOut()
This method returns a handle to the current standard output stream. |
Terminal |
getTerminal()
This method returns a handle to the current user Terminal object that was passed in as a parameter to the constructor. |
java.lang.String |
parseForEnvVariables(java.lang.String cmd)
|
protected java.util.Vector |
processCommand(java.lang.String cmd)
This method takes in a command as a parameter and breaks it down into a Vectora. |
void |
setCurrentLocation(java.io.File newLocation)
Static method that allows objects within the shell to set the current working directory. |
void |
setEnvironmentVariable(java.lang.String key,
java.lang.String value)
Returns a handle to the Environment object's envVariable Hashtable which contains all the current registered env variables. |
void |
setStandardOut(java.io.PrintStream output)
Sets the standard output stream for the environment to the method's only argument. |
void |
setTerminal(Terminal terminal)
Sets the standard output stream for the environment to the method's only argument. |
void |
startRuntime(java.lang.String strcmd)
-------- Deprecated ------------ Use doCommand() instead. |
void |
terminateCommand(java.lang.String msg)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static java.lang.String RUNTIME_COMMAND_PACKAGE
| Method Detail |
public static Environment getEnvironment()
Terminalpublic java.io.PrintStream getStandardOut()
Terminalpublic void setStandardOut(java.io.PrintStream output)
output - - the new standard output streampublic Terminal getTerminal()
Terminalpublic void setTerminal(Terminal terminal)
public java.io.File getCurrentLocation()
#setCurrentLocation()public void setCurrentLocation(java.io.File newLocation)
newLocation - - the new present working directory.
getCurrentLocation()public java.lang.String getEnvironmentVariable(java.lang.String name)
name - - a string representation of the variable name to look for.
#setEnvironmentVariable(),
getAllEnvironmentVariables()public java.util.Hashtable getAllEnvironmentVariables()
#setEnvironmentVariable(),
#getEnvironmentVariable()
public void setEnvironmentVariable(java.lang.String key,
java.lang.String value)
key - - key value of the environment variable, will be used as key for hashtable.value - - value of the variable.getAllEnvironmentVariables(),
#getEnvironmentVariable()public java.lang.Object[] getAutoComplete(java.lang.String toMatch)
getAutoComplete(String location, String toMatch),
#matchFiles(String toMatch).
public java.lang.Object[] getAutoComplete(java.lang.String location,
java.lang.String toMatch)
location - - location of the directory which is being checked.
getAutoComplete(String location, String toMatch),
#matchFiles(String toMatch).public void doCommand(java.lang.String cmd)
cmd - - the command to executegetAutoComplete(String location, String toMatch),
#matchFiles(String toMatch).protected java.util.Vector processCommand(java.lang.String cmd)
cmd - - the command to be processed.
public java.lang.String parseForEnvVariables(java.lang.String cmd)
public void startRuntime(java.lang.String strcmd)
strcmd - - the command to be processed.
shell.RuntimeProcessController#command().
public void executeCommand(java.util.Vector cmd,
java.lang.String strcmd)
cmd - - the command broken up into idividual elements.strcmd - - the command to be processed.
shell.ProcessController#command().public void terminateCommand(java.lang.String msg)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||