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 Frame
implements 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.2 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o SimpleCLI()
Constructor

Method Index

 o actionPerformed(ActionEvent)
Only gets called when return is pressed in the input area, which starts the command running.
 o doHistory(KeyEvent)
Changes the currently displayed command line when certain keys are pressed.
 o main(String[])
Method to start up the simple cli
 o runCommand(String)
Executes a simple cli command.

Constructors

 o SimpleCLI
 public SimpleCLI() throws Exception
Constructor

Throws: Exception
if an error occurs

Methods

 o runCommand
 public void runCommand(String commands) throws Exception
Executes a simple cli command.

Parameters:
commands - the command string
Throws: Exception
if an error occurs
 o doHistory
 public void doHistory(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'
 o actionPerformed
 public void actionPerformed(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'
 o main
 public static void main(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