C - public interface Editor<C>
extends java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CARRIEGE_RETURN |
static java.lang.String |
NEW_LINE |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
backspace()
Deletes the previous character if exists.
|
java.lang.String |
delete()
Deletes the current character, shifting remaining characters one position left.
|
void |
findNext(java.lang.String str)
Finds the next appearance of the String.
|
void |
findPrevious(java.lang.String str)
Finds the next appearance of the String.
|
int |
getColumn()
Returns the current column.
|
C |
getContent()
Returns the content of the file.
|
C |
getContent(int line)
Returns the content of the file.
|
ContentManager |
getContentManager()
Sets the
ContentManager. |
int |
getLine()
Returns the number of the current line.
|
java.lang.String |
getSource()
Returns the
File being edited. |
java.lang.Boolean |
isDirty()
Returns if editor contains 'dirty' data.
|
int |
lines()
Returns the number of lines.
|
void |
mergeLine()
Removes the new line character at the end of the line.
|
void |
move(int line,
int column)
Moves the cursor to the specified line and column.
|
void |
moveToEndOfFile()
Moves cursor to the end of the line.
|
void |
moveToEndOfLine()
Moves cursor to the end of the line.
|
void |
moveToStartOfFile()
Moves the cursors to the start of the line.
|
void |
moveToStartOfLine()
Moves the cursors to the start of the line.
|
void |
newLine()
Adds a new line to the current position.
|
void |
open(java.lang.String source)
Opens a file for editing.
|
void |
put(java.lang.String str)
Puts the
link to the current position. |
void |
save(java.lang.String target)
Saves the file.
|
void |
setContentManager(ContentManager contentManager)
Returns the
ContentManager. |
void |
setDirty(java.lang.Boolean dirty)
Marks that the editor has unsaved changes.
|
static final java.lang.String NEW_LINE
static final java.lang.String CARRIEGE_RETURN
void open(java.lang.String source)
throws java.io.IOException
source - java.io.IOExceptionvoid save(java.lang.String target)
throws java.io.IOException
target - java.io.IOExceptionint getLine()
int getColumn()
void move(int line,
int column)
line - column - void moveToStartOfLine()
void moveToEndOfLine()
void moveToStartOfFile()
void moveToEndOfFile()
void put(java.lang.String str)
link to the current position.str - java.lang.String delete()
java.lang.String backspace()
void newLine()
void mergeLine()
void findNext(java.lang.String str)
str - int lines()
void findPrevious(java.lang.String str)
str - void setDirty(java.lang.Boolean dirty)
dirty - java.lang.Boolean isDirty()
C getContent()
C getContent(int line)
java.lang.String getSource()
File being edited.ContentManager getContentManager()
ContentManager.void setContentManager(ContentManager contentManager)
ContentManager.contentManager - Copyright © 2018. All Rights Reserved.