MCPcopy Index your code
hub / github.com/beanshell/beanshell / AWTConsole

Method AWTConsole

src/bsh/util/AWTConsole.java:98–119  ·  view source on GitHub ↗
( int rows, int cols, InputStream cin, OutputStream cout )

Source from the content-addressed store, hash-verified

96 private int histLine = 0;
97
98 public AWTConsole( int rows, int cols, InputStream cin, OutputStream cout ) {
99 super(rows, cols);
100 setFont( new Font("Monospaced",Font.PLAIN,14) );
101 setEditable(false);
102 addKeyListener ( this );
103
104 outPipe = cout;
105 if ( outPipe == null ) {
106 outPipe = new PipedOutputStream();
107 try {
108 in = new PipedInputStream((PipedOutputStream)outPipe);
109 } catch ( IOException e ) {
110 print("Console internal error...");
111 }
112 }
113
114 // start the inpipe watcher
115 inPipe = cin;
116 new Thread( this ).start();
117
118 requestFocus();
119 }
120
121 public void keyPressed( KeyEvent e ) {
122 type( e.getKeyCode(), e.getKeyChar(), e.getModifiers() );

Callers

nothing calls this directly

Calls 3

printMethod · 0.95
setFontMethod · 0.80
requestFocusMethod · 0.80

Tested by

no test coverage detected