public interface ConsoleEditor extends Editor<String>, InputReader, LifeCycle
CARRIEGE_RETURN, NEW_LINE| Modifier and Type | Method and Description |
|---|---|
int |
getFooterSize()
Returns the size in lines of the footer.
|
int |
getHeaderSize()
Returns the size in lines of the header.
|
jline.Terminal |
getTerminal()
Returns the
Terminal used by the ConsoleEditor. |
Theme |
getTheme()
Returns the
Theme. |
String |
getTitle()
Returns the
ConsoleEditor title. |
void |
hide()
Hides the editor.
|
boolean |
isOpenEnabled()
Checks if the
ConsoleEditor can open new file. |
boolean |
isReadOnly()
Checks if the
ConsoleEditor is set to be read only. |
void |
moveDown(int offset)
Moves cursor down.
|
void |
moveLeft(int offset)
Moves cursor left.
|
void |
moveRight(int offset)
Moves cursor left.
|
void |
moveUp(int offset)
Moves cursors up.
|
void |
open(File source,
String displayAs)
Opens a file for editing.
|
void |
redrawCoords()
Redraws the cursor coordinates if the flavor supports that.
|
void |
redrawFooter()
Redraws the footer of the editor (if exists).
|
void |
redrawHeader()
Redraws the header of the editor (if exists).
|
void |
redrawText()
Redraws the text that fits inside the current frame.
|
void |
restoreCursorPosition()
Moves the cursor to the last saved position.
|
void |
saveCursorPosition()
Saves the cursor position.
|
void |
setOpenEnabled(boolean openEnabled)
Allows/disallows the
ConsoleEditor to open files. |
void |
setReadOnly(boolean readOnly)
Sets/Unsets the
ConsoleEditor to read only mode. |
void |
setTheme(Theme theme)
Sets the
Theme of the editor. |
void |
setTitle(String title)
Sets the
ConsoleEditor title. |
void |
show()
Shows the editor.
|
backspace, delete, end, findNext, findPrevious, getColumn, getContent, getContent, getFile, getLine, home, isDirty, lines, mergeLine, move, newLine, open, put, save, setDirtyread, readBoolean, readBoolean, readLine, readLinevoid open(File source, String displayAs) throws IOException
source - displayAs - The display String (if flavor supports it).IOExceptionvoid show()
void hide()
void moveUp(int offset)
offset - The number of lines to move upwards.void moveDown(int offset)
offset - The number of lines to move downwards.void moveLeft(int offset)
offset - The number of lines to move.void moveRight(int offset)
offset - The number of lines to move.void redrawText()
void redrawHeader()
void redrawFooter()
void redrawCoords()
void saveCursorPosition()
void restoreCursorPosition()
int getHeaderSize()
int getFooterSize()
jline.Terminal getTerminal()
Terminal used by the ConsoleEditor.String getTitle()
ConsoleEditor title.void setTitle(String title)
ConsoleEditor title.title - boolean isReadOnly()
ConsoleEditor is set to be read only.void setReadOnly(boolean readOnly)
ConsoleEditor to read only mode.readOnly - boolean isOpenEnabled()
ConsoleEditor can open new file.void setOpenEnabled(boolean openEnabled)
ConsoleEditor to open files.openEnabled - Copyright © 2013. All Rights Reserved.