Main Page   Packages   Class Hierarchy   Compound List   Compound Members   Related Pages  

Console.JConsole Class Reference

This is a simple GUI console. More...

List of all members.

Public Member Functions

 JConsole ()
 Creates a new instance of JConsole.

void initialize ()
InputStream getInputStream ()
void actionPerformed (ActionEvent e)
 Invoked when an action occurs.

void keyPressed (KeyEvent e)
 Invoked when a key has been pressed.

void keyReleased (KeyEvent e)
 Invoked when a key has been released.

void keyTyped (KeyEvent e)
 Invoked when a key has been typed.

void mouseClicked (MouseEvent e)
 Invoked when the mouse button has been clicked (pressed and released) on a component.

void mouseEntered (MouseEvent e)
 Invoked when the mouse enters a component.

void mouseExited (MouseEvent e)
 Invoked when the mouse exits a component.

void mousePressed (MouseEvent e)
 Invoked when a mouse button has been pressed on a component.

void mouseReleased (MouseEvent e)
 Invoked when a mouse button has been released on a component.

void propertyChange (PropertyChangeEvent evt)
 This method gets called when a bound property is changed.

void addActionListener (ActionListener al)
void removeActionListener (ActionListener al)
void addNameCompletionListener (NameCompletionListener tl)
void removeNameCompletionListener (NameCompletionListener tl)
void resetCommandStart ()
 Prints the prompt and prepairs for input.

void append (String string)
String replaceRange (Object s, int start, int end)
String getPrompt ()
void setPrompt (String prompt)
String getPostPrompt ()
void setPostPrompt (String postPrompt)
String toString ()
void println (String string)
void print (String string)
void println ()
void println (Object object)
void print (Object object)

Protected Member Functions

void initComponents ()
void moveCaretToEnd ()
void moveCaretToStart ()
 Moves the cursor to the beginning of the line.

void nameCompletionEvent ()
void enter ()
void dispatchEvent (String cmd)
void historyUp ()
void historyDown ()
void showHistoryLine ()

Protected Attributes

JEditorPane tpText
 The text pane.

JPopupMenu mPopup
 The popup menu.

String sPrompt
 The prompt.

String sPostPrompt
 A String that is printed after the prompt, but can be edited by the user.

char cEnterChar = '\n'
 The char that signifies "enter".

Vector vListeners = new Vector()
 The action listeners.

Vector nameListeners = new Vector()
 The name completion listeners.

Vector vHistory = new Vector()
 Holds the history.

AbstractDocument doc
 The Document for the output.


Detailed Description

This is a simple GUI console.

It generates ActionEvents whenever the user presses the Enter key and TextEvents when the name completion key is pressed. It has a history, a prompt and that's about it. More complex things should be done by whatever understands the input! It can also print text in lots of different ways and icons. It is based very loosely on the JConsole class in the BeanShell scripting framework, but is extremely modified.

Author:
Matthew Palmer
Date:
9/12/02


Member Function Documentation

void Console.JConsole.keyPressed KeyEvent    e
 

Invoked when a key has been pressed.

See the class description for KeyEvent for a definition of a key pressed event.

void Console.JConsole.keyReleased KeyEvent    e
 

Invoked when a key has been released.

See the class description for KeyEvent for a definition of a key released event.

void Console.JConsole.keyTyped KeyEvent    e
 

Invoked when a key has been typed.

See the class description for KeyEvent for a definition of a key typed event.

void Console.JConsole.propertyChange PropertyChangeEvent    evt
 

This method gets called when a bound property is changed.

Parameters:
evt A PropertyChangeEvent object describing the event source and the property that has changed.

void Console.JConsole.resetCommandStart  
 

Prints the prompt and prepairs for input.

Should be called by a client if they want to force a new command.


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:38:42 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3