bsh.util

Class JConsole

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 including Cut & Paste Improvements by: Daniel Leuck including Color and Image support, key press bug workaround
Nested Class Summary
static classJConsole.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
voidactionPerformed(ActionEvent event)
voiderror(String s)
PrintStreamgetErr()
ReadergetIn()
InputStreamgetInputStream()
PrintStreamgetOut()
AttributeSetgetStyle()
voidkeyPressed(KeyEvent e)
voidkeyReleased(KeyEvent e)
voidkeyTyped(KeyEvent e)
voidmouseClicked(MouseEvent event)
voidmouseEntered(MouseEvent event)
voidmouseExited(MouseEvent event)
voidmousePressed(MouseEvent event)
voidmouseReleased(MouseEvent event)
voidprint(String string)
voidprint(Object object)
Prints the primitive type "float" (needed because of float->double coercion weirdness) public void println(float f) { println(String.valueOf(f)); }
voidprint(Icon icon)
voidprint(Object s, Font font)
Prints the primitive type "float" (needed because of float->double coercion weirdness) public void print(float f) { print(String.valueOf(f)); }
voidprint(Object s, Color color)
voidprint(String s, Color color)
voidprint(Object s, Font font, Color color)
voidprint(Object s, String fontFamilyName, int size, Color color)
voidprint(Object s, String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline)
voidprintln(String string)
voidprintln()
Prints "\\n" (i.e. newline)
voidprintln(Object object)
voidprintln(Icon icon)
voidpropertyChange(PropertyChangeEvent event)
voidrequestFocus()
voidrun()
voidsetFont(Font font)
voidsetNameCompletion(NameCompletion nc)
AttributeSetsetStyle(Font font)
AttributeSetsetStyle(Color color)
AttributeSetsetStyle(Font font, Color color)
AttributeSetsetStyle(String fontFamilyName, int size, Color color)
AttributeSetsetStyle(String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline)
voidsetStyle(AttributeSet attributes)
voidsetStyle(AttributeSet attributes, boolean overWrite)
voidsetWaitFeedback(boolean on)
StringtoString()

Constructor Detail

JConsole

public JConsole()

JConsole

public JConsole(InputStream cin, OutputStream cout)

Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)

error

public void error(String s)

getErr

public PrintStream getErr()

getIn

public Reader getIn()

getInputStream

public InputStream getInputStream()

getOut

public PrintStream getOut()

getStyle

public AttributeSet getStyle()

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(String string)

print

public void print(Object object)
Prints the primitive type "float" (needed because of float->double coercion weirdness) public void println(float f) { println(String.valueOf(f)); }

print

public void print(Icon icon)

print

public void print(Object s, Font font)
Prints the primitive type "float" (needed because of float->double coercion weirdness) public void print(float f) { print(String.valueOf(f)); }

print

public void print(Object s, Color color)

print

public void print(String s, Color color)

print

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

print

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

print

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

println

public void println(String string)

println

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

println

public void println(Object object)

println

public void println(Icon icon)

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)

setStyle

public AttributeSet setStyle(Font font)

setStyle

public AttributeSet setStyle(Color color)

setStyle

public AttributeSet setStyle(Font font, Color color)

setStyle

public AttributeSet setStyle(String fontFamilyName, int size, Color color)

setStyle

public AttributeSet setStyle(String fontFamilyName, int size, Color color, boolean bold, boolean italic, boolean underline)

setStyle

public void setStyle(AttributeSet attributes)

setStyle

public void setStyle(AttributeSet attributes, boolean overWrite)

setWaitFeedback

public void setWaitFeedback(boolean on)

toString

public String toString()
B) 2000 pat@pat.net :-)