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)

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.

Constructor Detail

 o SimpleCLI
public SimpleCLI() throws java.lang.Exception
          Constructor
Throws:
java.lang.Exception - if an error occurs

Method Detail

 o 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
 o 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'
 o 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'
 o 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