A B C E F G H I K L N O P R S T U W

A

add(Command) - Method in class org.adougou.cline.CommandRegister
 
add(ICLinePackage) - Method in class org.adougou.cline.CommandRegister
Registers an entire Java package for use with the command line.
askBooleanQuestion(String) - Method in interface org.adougou.cline.IPrompt
 
askBooleanQuestion(String) - Method in class org.adougou.cline.BasePrompt
Ask the user a boolean question.
askQuestion(String) - Method in interface org.adougou.cline.IPrompt
 
askQuestion(String) - Method in class org.adougou.cline.BasePrompt
Ask the user a question.
askQuestion(String, String) - Method in interface org.adougou.cline.IPrompt
 
askQuestion(String, String) - Method in class org.adougou.cline.BasePrompt
Ask the user a question and provide a default answer (to save the user typing if it is a likely default).
available() - Method in class org.adougou.cline.TextAreaInputStream
 

B

BaseCommand - class org.adougou.cline.BaseCommand.
Base class for creating named commands.
BaseCommand(String, int, String) - Constructor for class org.adougou.cline.BaseCommand
All inheriting classes are required to call this constructor using
BasePrompt - class org.adougou.cline.BasePrompt.
Base class for all command prompts.
BasePrompt(String, CommandRegister, PrintStream, PrintStream, InputStream) - Constructor for class org.adougou.cline.BasePrompt
 

C

checkPermission(Permission) - Method in class org.adougou.cline.BaseCommand
Dervied classes that require a special permission (for example, to call the VM to exit as in the ExitCommand) should call this method to check the java.security.Permission.
close() - Method in class org.adougou.cline.TextAreaOutputStream
Close and flush() the stream.
Command - interface org.adougou.cline.Command.
Interface implemented by all commands.
CommandException - exception org.adougou.cline.CommandException.
If an unrecoverable error occurs when executing a command (eg.
CommandException(String) - Constructor for class org.adougou.cline.CommandException
 
CommandRegister - class org.adougou.cline.CommandRegister.
This class is used internally by the BasePrompt to maintain a table of registered commands.
CommandRegister() - Constructor for class org.adougou.cline.CommandRegister
 

E

err - Variable in class org.adougou.cline.BasePrompt
 
execute(Iterator) - Method in class org.adougou.cline.BaseCommand
This method is called internally whenever a command is executed to check the arguments.
execute(Iterator) - Method in interface org.adougou.cline.Command
 
execute(Iterator) - Method in class org.adougou.cline.WindowCommand
 
execute(String) - Method in class org.adougou.cline.BaseCommand
This method enables a command to be used independently of the command prompt.
execute(String) - Method in class org.adougou.cline.CommandRegister
Parses a string containing a command name and arguments and then executes the command if it was well structured (the string 'command' will be parsed - looking for the name of the command and any arguments required for that command).
execute(String[]) - Method in class org.adougou.cline.BaseCommand
This method should be overloaded by each command that is defined - it will be called by the CommandRegister after the number of arguments have been checked.
execute(String[]) - Method in class org.adougou.cline.RunScriptCommand
 
execute(String[]) - Method in interface org.adougou.cline.Command
 
execute(String[]) - Method in class org.adougou.cline.PrintWorkingDirectoryCommand
 
execute(String[]) - Method in class org.adougou.cline.ExitCommand
 
execute(String[]) - Method in class org.adougou.cline.HelpCommand
 
execute(String[]) - Method in class org.adougou.cline.TimeCommand
 
execute(String[]) - Method in class org.adougou.cline.ListCommand
 
exit() - Method in class org.adougou.cline.CommandRegister
 
exit() - Method in interface org.adougou.cline.IPrompt
 
exit() - Method in interface org.adougou.cline.ICLinePackage
 
exit() - Method in class org.adougou.cline.BasePrompt
Iterates through all the registered packages and tells them we are exiting - just in case they have resources to free.
ExitCommand - class org.adougou.cline.ExitCommand.
Command to exit the program.

F

flush() - Method in class org.adougou.cline.TextAreaOutputStream
 

G

getBufferedReader(URL) - Method in class org.adougou.cline.URLCommand
Utility method that given a URL, allocates a BufferedReader and opens the URL for reading data.
getCommands() - Method in interface org.adougou.cline.ICLinePackage
 
getHelp() - Method in class org.adougou.cline.BaseCommand
Return a the help string for this command.
getHelp() - Method in interface org.adougou.cline.Command
 
getHelp() - Method in class org.adougou.cline.HelpCommand
This method overloads the BaseCommand help function - the HelpCommand is the only class where this makes sense.
getName() - Method in class org.adougou.cline.BaseCommand
 
getName() - Method in interface org.adougou.cline.Command
 
getPreferredSize() - Method in class org.adougou.cline.TextArea
The java.awt.TextArea.getPreferredSize() method seems to insist on making the TextArea slight larger than is required to fit the specified number of rows.
getPrompt() - Method in class org.adougou.cline.BaseCommand
 
getURLs(String[]) - Method in class org.adougou.cline.URLCommand
Given an array of Strings, try and create a URL from each String.

H

help_ - Variable in class org.adougou.cline.BaseCommand
 
HelpCommand - class org.adougou.cline.HelpCommand.
This command is used to query information about any command that has been registered with the prompt.

I

ICLinePackage - interface org.adougou.cline.ICLinePackage.
Any Java package that is intended to be used with the cline package needs to implement this interface and return an array of Commands that it would like to use with the command prompt.
in - Variable in class org.adougou.cline.BasePrompt
 
IPrompt - interface org.adougou.cline.IPrompt.
Command prompt interface.

K

keyPressed(KeyEvent) - Method in class org.adougou.cline.TextArea
Notes from the KeyEvent API documentation: keyTyped events are higher level and do not usually depend on the platform or keyboard layout.
keyReleased(KeyEvent) - Method in class org.adougou.cline.TextArea
 
keyTyped(KeyEvent) - Method in class org.adougou.cline.TextArea
 

L

ListCommand - class org.adougou.cline.ListCommand.
Command to display the contents of the current working directory.

N

name_ - Variable in class org.adougou.cline.BaseCommand
 
numArgs_ - Variable in class org.adougou.cline.BaseCommand
 

O

org.adougou.cline - package org.adougou.cline
 
out - Variable in class org.adougou.cline.BasePrompt
 

P

PrefixPrintStream - class org.adougou.cline.PrefixPrintStream.
This class is a slight modification of the standard PrintStream (which is derived from a FilterStream) to append a prefix to any line message (eg.
println(Object) - Method in class org.adougou.cline.PrefixPrintStream
Slight modification of the PrintStream.println(String) method - a prefix will be inserted at the front of data being streamed.
println(String) - Method in class org.adougou.cline.PrefixPrintStream
Same idea as the println(String) method.
printPrompt() - Method in class org.adougou.cline.BasePrompt
 
PrintWorkingDirectoryCommand - class org.adougou.cline.PrintWorkingDirectoryCommand.
Command to print out the current working directory.
prompt - Static variable in class org.adougou.cline.BaseCommand
 

R

read() - Method in class org.adougou.cline.TextAreaInputStream
Read a single byte from the TextArea.
read(byte[], int, int) - Method in class org.adougou.cline.TextAreaInputStream
Read an array of bytes.
redirectSystemIOToPrompt() - Method in class org.adougou.cline.BasePrompt
 
register_ - Variable in class org.adougou.cline.BaseCommand
 
registerCommand(Command) - Method in interface org.adougou.cline.IPrompt
 
registerCommand(Command) - Method in class org.adougou.cline.BasePrompt
This method is called to register a new command to be used with this prompt.
registerPackage(ICLinePackage) - Method in interface org.adougou.cline.IPrompt
 
registerPackage(ICLinePackage) - Method in class org.adougou.cline.BasePrompt
 
run() - Method in class org.adougou.cline.BasePrompt
This method starts the prompt in interactive mode.
RunScriptCommand - class org.adougou.cline.RunScriptCommand.
This command reads in a text file (or URL) containing a list of commands.

S

set(CommandRegister) - Method in class org.adougou.cline.BaseCommand
This method is called by the CommandRegister whenever a new command is registered - this gives commands access to help information for other commands - eg.
set(CommandRegister) - Method in interface org.adougou.cline.Command
 
ShellPrompt - class org.adougou.cline.ShellPrompt.
Command prompt to be used within a xterm or DOS-shell.
ShellPrompt(String) - Constructor for class org.adougou.cline.ShellPrompt
Same idea as the other constructor, however will construct a new CommandRegister for use with the prompt.
ShellPrompt(String, CommandRegister) - Constructor for class org.adougou.cline.ShellPrompt
The shell prompt is an easy one - it just makes use of System.out, System.err and System.in.
start() - Method in interface org.adougou.cline.IPrompt
 

T

TextArea - class org.adougou.cline.TextArea.
This is a special TextArea for use with the TextAreaPrompt.
TextArea(int) - Constructor for class org.adougou.cline.TextArea
Construct a new TextArea for use with the TextAreaPrompt.
TextArea(int, int) - Constructor for class org.adougou.cline.TextArea
Construct a new TextArea for use with the TextAreaPrompt.
TextAreaInputStream - class org.adougou.cline.TextAreaInputStream.
This is an InputStream that can be assigned to System.in.
TextAreaOutputStream - class org.adougou.cline.TextAreaOutputStream.
OutputStream for printing to a TextArea.
TextAreaPrompt - class org.adougou.cline.TextAreaPrompt.
This class is used in conjunction with TextArea to provide an AWT-based command prompt.
TextAreaPrompt(String, TextArea) - Constructor for class org.adougou.cline.TextAreaPrompt
Same idea as the other constructor however will allocate a new command register for use by the prompt.
TextAreaPrompt(String, TextArea, CommandRegister) - Constructor for class org.adougou.cline.TextAreaPrompt
The TextAreaPrompt requires a TextArea.
TimeCommand - class org.adougou.cline.TimeCommand.
Simple command to prints out the current date/time.
TimeCommand() - Constructor for class org.adougou.cline.TimeCommand
 
toString() - Method in class org.adougou.cline.CommandException
 

U

URLCommand - class org.adougou.cline.URLCommand.
Any command that loads a URL (eg.
URLCommand(String, int, String) - Constructor for class org.adougou.cline.URLCommand
 

W

WindowCommand - class org.adougou.cline.WindowCommand.
This class is not currently used, but I have included it to remind me of the idea and maybe one day I will finish implementing it.
WindowCommand(String, int, String, Window) - Constructor for class org.adougou.cline.WindowCommand
 
write(int) - Method in class org.adougou.cline.TextAreaOutputStream
 

A B C E F G H I K L N O P R S T U W