All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.gui.SimpleCLI
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----weka.gui.SimpleCLI
- public class SimpleCLI
- extends java.awt.Frame
- implements java.awt.event.ActionListener
Creates a very simple command line for invoking the main method of
classes. System.out and System.err are redirected to an output area.
Features a simple command history -- use up and down arrows to move
through previous commmands. This gui uses only AWT (i.e. no Swing).
- Version:
- $Revision: 1.5 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
SimpleCLI()
- Constructor
actionPerformed(ActionEvent)
- Only gets called when return is pressed in the input area, which
starts the command running.
doHistory(KeyEvent)
- Changes the currently displayed command line when certain keys
are pressed.
main(String[])
- Method to start up the simple cli
runCommand(String)
- Executes a simple cli command.
SimpleCLI
public SimpleCLI() throws java.lang.Exception
Constructor
- Throws:
- java.lang.Exception - if an error occurs
runCommand
public void runCommand(java.lang.String commands) throws java.lang.Exception
Executes a simple cli command.
- Parameters:
commands
- the command string
- Throws:
- java.lang.Exception - if an error occurs
doHistory
public void doHistory(java.awt.event.KeyEvent e)
Changes the currently displayed command line when certain keys
are pressed. The up arrow moves back through history entries
and the down arrow moves forward through history entries.
- Parameters:
e
- a value of type 'KeyEvent'
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Only gets called when return is pressed in the input area, which
starts the command running.
- Parameters:
e
- a value of type 'ActionEvent'
main
public static void main(java.lang.String args[])
Method to start up the simple cli
- Parameters:
args
- array of command line arguments. Not used.
All Packages Class Hierarchy This Package Previous Next Index WEKA's home