jline.console
Enum Operation

java.lang.Object
  extended by java.lang.Enum<Operation>
      extended by jline.console.Operation
All Implemented Interfaces:
Serializable, Comparable<Operation>

public enum Operation
extends Enum<Operation>

Map for console operation to virtual key bindings.

Since:
2.0
Author:
Marc Prud'hommeaux, Jason Dillon
See Also:
KeyEvent

Enum Constant Summary
ABORT
          Cancel search
ADD
          Operation that
CHANGE_CASE
          Operation that toggles between uppercase and lowercase.
CHANGE_META
          Operation that
CLEAR_LINE
          Operation that clears whatever text is on the current line.
CLEAR_SCREEN
          Operation that clears the screen.
COMPLETE
          Operation that performs completion operation on the current word.
DELETE_META
          Operation that
DELETE_NEXT_CHAR
          Operation that deletes the previous character.
DELETE_PREV_CHAR
          Operation that
DELETE_PREV_WORD
          Operation that deletes the previous word in the buffer.
END_OF_HISTORY
          Operation that moves the current History to the end.
END_WORD
          Operation that
EXIT
          Operation that exits the command prompt.
INSERT
          Operation that toggles insert/overtype
KILL_LINE
          Operation that deletes the buffer from the current character to the end.
KILL_LINE_PREV
          Operation that deletes the buffer from the cursor to the beginning.
MOVE_TO_BEG
          Operation that moves to the beginning of the buffer.
MOVE_TO_END
          Operation that moves to the end of the buffer.
NEWLINE
          Operation that issues a newline.
NEXT_CHAR
          Operation that moves to the next character in the buffer.
NEXT_HISTORY
          Operation that sets the buffer to the next history item.
NEXT_SPACE_WORD
          Operation that
NEXT_WORD
          Operation that moved to the next word.
PASTE
          Operation that pastes the contents of the clipboard into the line
PASTE_NEXT
          Operation that
PASTE_PREV
          Operation that
PREV_CHAR
          Operation that moved to the previous character in the buffer.
PREV_HISTORY
          Operation that sets the buffer to the previous history item.
PREV_SPACE_WORD
          Operation that moved to the previous whitespace.
PREV_WORD
          Operation that
REDISPLAY
          Operation that redisplays the current buffer.
REPEAT_NEXT_CHAR
          Operation that repeats the character.
REPEAT_PREV_CHAR
          Operation that moves to the previous character in the buffer.
REPEAT_SEARCH_NEXT
          Operation that
REPEAT_SEARCH_PREV
          Operation that
REPLACE_CHAR
          Operation that
REPLACE_MODE
          Operation that
SEARCH_NEXT
          Operation that searches forward in the command history.
SEARCH_PREV
          Operation that searches backwards in the command history.
START_OF_HISTORY
          Operation that moves the current History to the beginning.
SUBSTITUTE_CHAR
          Operation that
SUBSTITUTE_LINE
          Operation that
TO_END_WORD
          Operation that moved to the end of the current word.
TO_NEXT_CHAR
          Operation that
TO_PREV_CHAR
          Operation that
UNDO
          Operation that undoes the previous operation.
UNKNOWN
          Unknown operation.
 
Field Summary
 short code
           
 
Method Summary
static Operation valueOf(int code)
           
static Operation valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Operation[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final Operation UNKNOWN
Unknown operation.


MOVE_TO_BEG

public static final Operation MOVE_TO_BEG
Operation that moves to the beginning of the buffer.


MOVE_TO_END

public static final Operation MOVE_TO_END
Operation that moves to the end of the buffer.


PREV_CHAR

public static final Operation PREV_CHAR
Operation that moved to the previous character in the buffer.


NEWLINE

public static final Operation NEWLINE
Operation that issues a newline.


KILL_LINE

public static final Operation KILL_LINE
Operation that deletes the buffer from the current character to the end.


CLEAR_SCREEN

public static final Operation CLEAR_SCREEN
Operation that clears the screen.


NEXT_HISTORY

public static final Operation NEXT_HISTORY
Operation that sets the buffer to the next history item.


PREV_HISTORY

public static final Operation PREV_HISTORY
Operation that sets the buffer to the previous history item.


REDISPLAY

public static final Operation REDISPLAY
Operation that redisplays the current buffer.


KILL_LINE_PREV

public static final Operation KILL_LINE_PREV
Operation that deletes the buffer from the cursor to the beginning.


DELETE_PREV_WORD

public static final Operation DELETE_PREV_WORD
Operation that deletes the previous word in the buffer.


NEXT_CHAR

public static final Operation NEXT_CHAR
Operation that moves to the next character in the buffer.


REPEAT_PREV_CHAR

public static final Operation REPEAT_PREV_CHAR
Operation that moves to the previous character in the buffer.


SEARCH_PREV

public static final Operation SEARCH_PREV
Operation that searches backwards in the command history.


REPEAT_NEXT_CHAR

public static final Operation REPEAT_NEXT_CHAR
Operation that repeats the character.


SEARCH_NEXT

public static final Operation SEARCH_NEXT
Operation that searches forward in the command history.


PREV_SPACE_WORD

public static final Operation PREV_SPACE_WORD
Operation that moved to the previous whitespace.


TO_END_WORD

public static final Operation TO_END_WORD
Operation that moved to the end of the current word.


REPEAT_SEARCH_PREV

public static final Operation REPEAT_SEARCH_PREV
Operation that


PASTE_PREV

public static final Operation PASTE_PREV
Operation that


REPLACE_MODE

public static final Operation REPLACE_MODE
Operation that


SUBSTITUTE_LINE

public static final Operation SUBSTITUTE_LINE
Operation that


TO_PREV_CHAR

public static final Operation TO_PREV_CHAR
Operation that


NEXT_SPACE_WORD

public static final Operation NEXT_SPACE_WORD
Operation that


DELETE_PREV_CHAR

public static final Operation DELETE_PREV_CHAR
Operation that


ADD

public static final Operation ADD
Operation that


PREV_WORD

public static final Operation PREV_WORD
Operation that


CHANGE_META

public static final Operation CHANGE_META
Operation that


DELETE_META

public static final Operation DELETE_META
Operation that


END_WORD

public static final Operation END_WORD
Operation that


INSERT

public static final Operation INSERT
Operation that toggles insert/overtype


REPEAT_SEARCH_NEXT

public static final Operation REPEAT_SEARCH_NEXT
Operation that


PASTE_NEXT

public static final Operation PASTE_NEXT
Operation that


REPLACE_CHAR

public static final Operation REPLACE_CHAR
Operation that


SUBSTITUTE_CHAR

public static final Operation SUBSTITUTE_CHAR
Operation that


TO_NEXT_CHAR

public static final Operation TO_NEXT_CHAR
Operation that


UNDO

public static final Operation UNDO
Operation that undoes the previous operation.


NEXT_WORD

public static final Operation NEXT_WORD
Operation that moved to the next word.


DELETE_NEXT_CHAR

public static final Operation DELETE_NEXT_CHAR
Operation that deletes the previous character.


CHANGE_CASE

public static final Operation CHANGE_CASE
Operation that toggles between uppercase and lowercase.


COMPLETE

public static final Operation COMPLETE
Operation that performs completion operation on the current word.


EXIT

public static final Operation EXIT
Operation that exits the command prompt.


PASTE

public static final Operation PASTE
Operation that pastes the contents of the clipboard into the line


START_OF_HISTORY

public static final Operation START_OF_HISTORY
Operation that moves the current History to the beginning.


END_OF_HISTORY

public static final Operation END_OF_HISTORY
Operation that moves the current History to the end.


CLEAR_LINE

public static final Operation CLEAR_LINE
Operation that clears whatever text is on the current line.


ABORT

public static final Operation ABORT
Cancel search

Field Detail

code

public final short code
Method Detail

values

public static Operation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Operation c : Operation.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Operation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

valueOf

public static Operation valueOf(int code)


Copyright © 2008-2011 Sonatype. All Rights Reserved.