|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.netcomputing.anyj.scripting.AJSTextDocument
a Document opened in the editor.
Method Summary | |
void |
centerLine(int line)
center line 'line' in the editor |
int |
computeScreenColumn(int col,
int line)
computes the real column visible on the screen of a carets position (TABS get expanded) |
java.lang.String |
constructWhiteSpace(int col)
constructs whitespace, replacing regions of blanks > TAB_SIZE by TABs |
void |
cutSelection()
cut the current selection |
void |
deleteCharLeft()
delete one character to the left |
void |
deleteCharRight()
delete one character to the right |
void |
deleteLine(int line)
delete line 'line' |
void |
deSelect()
unselect |
void |
findAndSelect(java.lang.String s)
find a String from the carets current position and select it |
char |
getCharacter(int col,
int line)
get the character at the given position |
int |
getCursorCol()
return the carets column position |
int |
getCursorLine()
return the carets line position |
java.io.File |
getFile()
return the file where this document was loaded from |
java.lang.String |
getLine(int li)
return the line at positioin 'li' |
int |
getLineCount()
return the number of lines of this document |
int |
getLineLength(int li)
return the length of the line at positioin li |
AJSTextDocument |
getSelection()
return the current selection |
java.lang.String |
getSelectionAsString()
return the current selection as String |
int[] |
getSelectionPosition()
return the current selection as a int[] { selection start column, selection start line, selection end column, selection end line } |
boolean |
hasSelection()
return wether the user has selected a string |
void |
hilightAll()
run the syntaxhilighter on the whole document |
void |
hilightLine(int index)
run the syntaxhilighter on line 'index' |
void |
insertIndent()
insert indent (respecting AnyJ's current user settings) at the carets position (=TAB) |
void |
insertLine(java.lang.String line)
insert line 'line' at the carets current position |
void |
insertLine(java.lang.String line,
int index)
insert line 'line' at the position idx |
void |
insertString(java.lang.String s)
insert a string at the carets position |
boolean |
isModified()
return wether this document contains unsaved changes |
boolean |
isReadOnly()
return wether this document is Read Only |
void |
load(java.io.File f)
load another file into this document |
void |
lockUpdate(boolean b)
lock gui update, (useful for mass-changes). |
void |
moveCursorAbsolute(int x,
int y,
boolean doScroll)
move the caret |
void |
moveToEnd()
move the caret to the end of the document |
void |
moveToHome()
move the caret to the beginning of the document |
void |
pasteDocument(AJSTextDocument toPaste)
paste 'toPaste' at the caret's position |
void |
repaint()
repaint all views of this document |
void |
save(java.io.File f)
save this document |
void |
select(int colStart,
int lineStart,
int colEnd,
int lineEnd)
set the selection |
void |
setLine(java.lang.String line,
int index)
set line 'line' at the position idx |
void |
unInsertIndent()
unInsert indent (respecting AnyJ's current user settings) at the carets position (=SHIFT TAB) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getLineCount()
public java.lang.String getLine(int li)
public int getLineLength(int li)
public boolean hasSelection()
public boolean isModified()
public boolean isReadOnly()
public void pasteDocument(AJSTextDocument toPaste)
public void cutSelection()
public AJSTextDocument getSelection()
public java.lang.String getSelectionAsString()
public void deSelect()
public int[] getSelectionPosition()
public void select(int colStart, int lineStart, int colEnd, int lineEnd)
public void findAndSelect(java.lang.String s)
public void moveToEnd()
public void moveToHome()
public void insertIndent()
public java.lang.String constructWhiteSpace(int col)
public int computeScreenColumn(int col, int line)
public void unInsertIndent()
public void deleteLine(int line)
public void deleteCharLeft()
public void deleteCharRight()
public void insertLine(java.lang.String line)
public void insertLine(java.lang.String line, int index)
public void hilightAll()
public void hilightLine(int index)
public void setLine(java.lang.String line, int index)
public void insertString(java.lang.String s)
public void save(java.io.File f) throws java.lang.Exception
public void load(java.io.File f)
public java.io.File getFile()
public int getCursorCol()
public int getCursorLine()
public void moveCursorAbsolute(int x, int y, boolean doScroll)
public void repaint()
public void lockUpdate(boolean b)
public void centerLine(int line)
public char getCharacter(int col, int line)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |