bsh.util

Class JConsole

Implemented Interfaces:
ActionListener, ConsoleInterface, GUIConsoleInterface, KeyListener, MouseListener, PropertyChangeListener, Runnable

public class JConsole
extends JScrollPane
implements GUIConsoleInterface, Runnable, KeyListener, MouseListener, ActionListener, PropertyChangeListener

A JFC/Swing based console for the BeanShell desktop. This is a descendant of the old AWTConsole. Improvements by: Mark Donszelmann <Mark.Donszelmann@cern.ch> including Cut & Paste Improvements by: Daniel Leuck including Color and Image support, key press bug workaround

Nested Class Summary

static class
JConsole.BlockingPipedInputStream
The overridden read method in this class will not throw "Broken pipe" IOExceptions; It will simply wait for new writers and data.

Constructor Summary

JConsole()
JConsole(InputStream cin, OutputStream cout)

Method Summary

void
actionPerformed(ActionEvent event)
void
error(Object o)
PrintStream
getErr()
Reader
getIn()
InputStream
getInputStream()
PrintStream
getOut()
void
keyPressed(KeyEvent e)
void
keyReleased(KeyEvent e)
void
keyTyped(KeyEvent e)
void
mouseClicked(MouseEvent event)
void
mouseEntered(MouseEvent event)
void
mouseExited(MouseEvent event)
void
mousePressed(MouseEvent event)
void
mouseReleased(MouseEvent event)
void
print(Icon icon)
void
print(Object o)
void
print(Object s, Color color)
void
print(Object s, Font font)
void
print(Object o, Font font, Color color)
void
print(Object s, String fontFamilyName, int size, Color color)
void
print(Object o, String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline)
void
println()
Prints "\\n" (i.e.
void
println(Icon icon)
void
println(Object o)
void
propertyChange(PropertyChangeEvent event)
void
requestFocus()
void
run()
void
setFont(Font font)
void
setNameCompletion(NameCompletion nc)
void
setWaitFeedback(boolean on)
e.g.
String
toString()

Constructor Details

JConsole

public JConsole()

JConsole

public JConsole(InputStream cin,
                OutputStream cout)

Method Details

actionPerformed

public void actionPerformed(ActionEvent event)

error

public void error(Object o)
Specified by:
error in interface ConsoleInterface

getErr

public PrintStream getErr()
Specified by:
getErr in interface ConsoleInterface

getIn

public Reader getIn()
Specified by:
getIn in interface ConsoleInterface

getInputStream

public InputStream getInputStream()

getOut

public PrintStream getOut()
Specified by:
getOut in interface ConsoleInterface

keyPressed

public void keyPressed(KeyEvent e)

keyReleased

public void keyReleased(KeyEvent e)

keyTyped

public void keyTyped(KeyEvent e)

mouseClicked

public void mouseClicked(MouseEvent event)

mouseEntered

public void mouseEntered(MouseEvent event)

mouseExited

public void mouseExited(MouseEvent event)

mousePressed

public void mousePressed(MouseEvent event)

mouseReleased

public void mouseReleased(MouseEvent event)

print

public void print(Icon icon)

print

public void print(Object o)
Specified by:
print in interface ConsoleInterface

print

public void print(Object s,
                  Color color)
Specified by:
print in interface GUIConsoleInterface

print

public void print(Object s,
                  Font font)

print

public void print(Object o,
                  Font font,
                  Color color)

print

public void print(Object s,
                  String fontFamilyName,
                  int size,
                  Color color)

print

public void print(Object o,
                  String fontFamilyName,
                  int size,
                  Color color,
                  boolean bold,
                  boolean italic,
                  boolean underline)

println

public void println()
Prints "\\n" (i.e. newline)

println

public void println(Icon icon)

println

public void println(Object o)
Specified by:
println in interface ConsoleInterface

propertyChange

public void propertyChange(PropertyChangeEvent event)

requestFocus

public void requestFocus()

run

public void run()

setFont

public void setFont(Font font)

setNameCompletion

public void setNameCompletion(NameCompletion nc)
Specified by:
setNameCompletion in interface GUIConsoleInterface

setWaitFeedback

public void setWaitFeedback(boolean on)
e.g. the wait cursor
Specified by:
setWaitFeedback in interface GUIConsoleInterface

toString

public String toString()

B) 2000-2005 pat@pat.net :-)