public class TextAreaReadline
extends java.lang.Object
implements java.awt.event.KeyListener
Modifier and Type | Class and Description |
---|---|
static class |
TextAreaReadline.Channel |
Modifier and Type | Field and Description |
---|---|
javax.swing.text.MutableAttributeSet |
inputStyle |
javax.swing.text.MutableAttributeSet |
outputStyle |
javax.swing.text.MutableAttributeSet |
promptStyle |
javax.swing.text.MutableAttributeSet |
resultStyle |
Constructor and Description |
---|
TextAreaReadline(javax.swing.text.JTextComponent area) |
TextAreaReadline(javax.swing.text.JTextComponent area,
java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
protected void |
append(java.lang.String toAppend,
javax.swing.text.AttributeSet style)
Output methods
|
protected void |
backAction(java.awt.event.KeyEvent event) |
protected void |
completeAction(java.awt.event.KeyEvent event) |
protected void |
downAction(java.awt.event.KeyEvent event) |
protected void |
enterAction(java.awt.event.KeyEvent event) |
java.io.InputStream |
getInputStream() |
protected java.lang.String |
getLine() |
java.io.OutputStream |
getOutputStream() |
void |
hookIntoRuntime(Ruby runtime)
Hooks this
TextAreaReadline instance into the
runtime, redefining the Readline module so that
it uses this object. |
void |
hookIntoRuntimeWithStreams(Ruby runtime)
Hooks this
TextAreaReadline instance into the
runtime, redefining the Readline module so that
it uses this object. |
void |
keyPressed(java.awt.event.KeyEvent event) |
void |
keyReleased(java.awt.event.KeyEvent arg0) |
void |
keyTyped(java.awt.event.KeyEvent arg0) |
java.lang.String |
readLine(java.lang.String prompt) |
protected void |
replaceText(int start,
int end,
java.lang.String replacement) |
void |
shutdown() |
protected void |
upAction(java.awt.event.KeyEvent event) |
public volatile javax.swing.text.MutableAttributeSet promptStyle
public volatile javax.swing.text.MutableAttributeSet inputStyle
public volatile javax.swing.text.MutableAttributeSet outputStyle
public volatile javax.swing.text.MutableAttributeSet resultStyle
public TextAreaReadline(javax.swing.text.JTextComponent area)
public TextAreaReadline(javax.swing.text.JTextComponent area, java.lang.String message)
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public void hookIntoRuntime(Ruby runtime)
TextAreaReadline
instance into the
runtime, redefining the Readline
module so that
it uses this object. This method does not redefine the standard
input-output streams. If you need that, use
hookIntoRuntimeWithStreams(Ruby)
.runtime
- The runtime.hookIntoRuntimeWithStreams(Ruby)
public void hookIntoRuntimeWithStreams(Ruby runtime)
TextAreaReadline
instance into the
runtime, redefining the Readline
module so that
it uses this object. This method also redefines the standard
input-output streams accordingly.runtime
- The runtime.hookIntoRuntime(Ruby)
protected void completeAction(java.awt.event.KeyEvent event)
protected void backAction(java.awt.event.KeyEvent event)
protected void upAction(java.awt.event.KeyEvent event)
protected void downAction(java.awt.event.KeyEvent event)
protected void replaceText(int start, int end, java.lang.String replacement)
protected java.lang.String getLine()
protected void enterAction(java.awt.event.KeyEvent event)
public java.lang.String readLine(java.lang.String prompt)
public void keyPressed(java.awt.event.KeyEvent event)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent arg0)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent arg0)
keyTyped
in interface java.awt.event.KeyListener
public void shutdown()
protected void append(java.lang.String toAppend, javax.swing.text.AttributeSet style)
Copyright © 2002-2009 JRuby Team. All Rights Reserved.