Logo Search packages:      
Sourcecode: jline version File versions  Download package

jline::ConsoleReader Class Reference

Inheritance diagram for jline::ConsoleReader:

jline::ConsoleOperations

List of all members.


Detailed Description

A reader for console applications. It supports custom tab-completion, saveable command history, and command line editing. On some platforms, platform-specific commands will need to be issued before the reader will function properly. See Terminal#initializeTerminal for convenience methods for issuing platform-specific setup commands.

Author:
Marc Prud'hommeaux

Definition at line 51 of file ConsoleReader.java.


Public Member Functions

boolean addCompletor (final Completor completor)
final boolean backspace () throws IOException
final void beep () throws IOException
boolean clearScreen () throws IOException
 ConsoleReader (InputStream in, Writer out, InputStream bindings, Terminal term) throws IOException
 ConsoleReader (final InputStream in, final Writer out, final InputStream bindings) throws IOException
 ConsoleReader (final InputStream in, final Writer out) throws IOException
 ConsoleReader () throws IOException
final void drawLine () throws IOException
final void flushConsole () throws IOException
int getAutoprintThreshhold ()
boolean getBellEnabled ()
CompletionHandler getCompletionHandler ()
Collection getCompletors ()
CursorBuffer getCursorBuffer ()
Character getEchoCharacter ()
History getHistory ()
InputStream getInput ()
int getTermheight ()
Terminal getTerminal ()
int getTermwidth ()
boolean killLine () throws IOException
boolean paste () throws IOException
void printColumns (final Collection stuff) throws IOException
final void printNewline () throws IOException
final void printString (final String str) throws IOException
final void putString (final String str) throws IOException
final int readCharacter (final char[] allowed) throws IOException
String readLine (final String prompt, final Character mask) throws IOException
String readLine (final String prompt) throws IOException
String readLine (final Character mask) throws IOException
String readLine () throws IOException
final int readVirtualKey () throws IOException
final void redrawLine () throws IOException
boolean removeCompletor (final Completor completor)
void setAutoprintThreshhold (final int autoprintThreshhold)
void setBellEnabled (final boolean bellEnabled)
void setCompletionHandler (final CompletionHandler completionHandler)
final boolean setCursorPosition (final int position) throws IOException
void setDebug (final PrintWriter debugger)
void setEchoCharacter (final Character echoCharacter)
void setHistory (final History history)
void setInput (final InputStream in)

Static Public Member Functions

static void debug (final String str)

Public Attributes

short ADD = -42
char BACKSPACE = '\b'
short CHANGE_CASE = -57
short CHANGE_META = -44
short CLEAR_SCREEN = -8
short COMPLETE = -58
char CTRL_B = 2
char CTRL_F = 6
char CTRL_N = 14
char CTRL_P = 16
short DELETE_META = -45
short DELETE_NEXT_CHAR = -56
short DELETE_PREV_CHAR = -41
short DELETE_PREV_WORD = -16
short END_WORD = -46
short EXIT = -59
short INSERT = -48
char KEYBOARD_BELL = '\07'
short KILL_LINE = -7
short KILL_LINE_PREV = -15
short MOVE_TO_BEG = -1
short MOVE_TO_END = -3
short NEWLINE = -6
short NEXT_CHAR = -19
short NEXT_HISTORY = -9
short NEXT_SPACE_WORD = -40
short NEXT_WORD = -55
short PASTE = -60
short PASTE_NEXT = -50
short PASTE_PREV = -36
short PREV_CHAR = -4
short PREV_HISTORY = -11
short PREV_SPACE_WORD = -27
short PREV_WORD = -43
short REDISPLAY = -13
short REPEAT_NEXT_CHAR = -24
short REPEAT_PREV_CHAR = -20
short REPEAT_SEARCH_NEXT = -49
short REPEAT_SEARCH_PREV = -34
short REPLACE_CHAR = -51
short REPLACE_MODE = -37
char RESET_LINE = '\r'
short SEARCH_NEXT = -25
short SEARCH_PREV = -21
short SUBSTITUTE_CHAR = -52
short SUBSTITUTE_LINE = -38
short TO_END_WORD = -29
short TO_NEXT_CHAR = -53
short TO_PREV_CHAR = -39
short UNDO = -54
short UNKNOWN = -99

Static Public Attributes

static final String CR = System.getProperty ("line.separator")
static SortedMap KEYMAP_NAMES

Package Functions

int clearEcho (int c) throws IOException
int countEchoCharacters (char c)
final String finishBuffer ()
int getCursorPosition ()
int getKeyForAction (short logicalAction)
StringBuffer getPrintableCharacters (char ch)
final boolean resetLine () throws IOException

Static Package Functions

 [static initializer]

Package Attributes

final CursorBuffer buf = new CursorBuffer ()
final List completors = new LinkedList ()
History history = new History ()
InputStream in
final Writer out
String prompt

Static Package Attributes

static PrintWriter debugger

Private Member Functions

final void back (final int num) throws IOException
final int backspace (final int num) throws IOException
final int backspaceAll () throws IOException
final void clearAhead (final int num) throws IOException
final boolean complete () throws IOException
void consumeException (final Throwable e)
final boolean deleteCurrentCharacter () throws IOException
final boolean deletePreviousWord () throws IOException
final void drawBuffer () throws IOException
final void drawBuffer (final int clear) throws IOException
boolean isDelimiter (char c)
final int moveCursor (final int num) throws IOException
final boolean moveHistory (final boolean next) throws IOException
final void moveInternal (final int where) throws IOException
final boolean moveToEnd () throws IOException
final boolean nextWord () throws IOException
final void pad (final String toPad, final int len, final StringBuffer appendTo)
final boolean previousWord () throws IOException
final void printCharacter (final int c) throws IOException
final void printCharacters (final char c, final int num) throws IOException
final void printCharacters (final char[] c) throws IOException
final void putChar (final int c, final boolean print) throws IOException
int[] readBinding () throws IOException
String readLine (InputStream in) throws IOException
final void setBuffer (final String buffer) throws IOException

Private Attributes

int autoprintThreshhold
boolean bellEnabled = true
CompletionHandler completionHandler = new CandidateListCompletionHandler ()
Character echoCharacter = null
final short[] keybindings
Character mask = null
final Terminal terminal

Static Private Attributes

static final Character NULL_MASK = new Character ((char)0)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index