| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Together's text editor. This text editor can contain only one file. It provides methods for
opening/saving a file, getting selection and visible area in the editor as well as its current line, column
and other file-specific information.
The method getPositionConverter returns a
IdeEditorPositionConverter object whose intent is to help you convert integer offset values to/from
TextPosition objects
(most editor's position-related methods take TextPosition as an argument).
IdeEditorManager creates and closes editors.
IdeEditorStyledChar stores data of character itself and its color and format.
IdeEditorStyledCharSource determines source of characters.
| Method Summary | |
TextPosition | getCaretPosition()Returns a caret position. |
String | getFile()Returns a string with a name of a file in this editor. |
String | getHighligtingScheme()Returns the name of a highlighting scheme. |
int | getLineCount()Returns the integer with the number of lines in the file in this editor. |
int | getLineLength(int line)Returns the integer with the length of the specified line. |
IdeEditorPositionConverter | getPositionConverter()Returns an offset to/from TextPosition converter. |
IdeEditorSelection | getSelection(String selectionType)Retuns a selection of the specified type in this editor. |
IdeEditorStyledCharSource | getStyledCharSource()Returns the IdeEditorStyledCharSource object |
int | getTabSize()Returns the size of tab character |
String | getText()Returns a string with the contents of a file in this editor. |
IdeEditorVisibleArea | getVisibleArea()Returns the visible area in this editor. |
void | save()Saves the contents of this file. |
void | setCaretPosition(TextPosition position)Sets the caret position. |
void | setFile(String fileName)Loads a file with the specified name. |
void | setHighligtingScheme(String scheme)Sets a new highligting scheme. |
void | setText(String text)Sets the contents of a file in this editor to the specified value. |
| Method Detail |
public TextPosition getCaretPosition()
TextPosition objectpublic String getFile()
public String getHighligtingScheme()
THE METHOD NAME IS MIS-SPELLED!!!
IT SHOULD BE getHighlightingScheme
String name of this highlighting schemepublic int getLineCount()
public int getLineLength(int line)
int number of the linepublic IdeEditorPositionConverter getPositionConverter()
TextPosition converter. Note that you cannot use the same instance
IdeEditorPositionConverter for several editors; use must get a separate instance for each
setFile method first).IdeEditorPositionConverterpublic IdeEditorSelection getSelection(String selectionType)
string with the ID of the kind of selection. These IDs are defined in
public IdeEditorStyledCharSource getStyledCharSource()
public int getTabSize()
public String getText()
public IdeEditorVisibleArea getVisibleArea()
IdeEditorVisibleArea instance.public void save()
public void setCaretPosition(TextPosition position)
TextPosition objectpublic void setFile(String fileName)
public void setHighligtingScheme(String scheme)
scheme. This scheme is used to highlight syntax constuctions, (reserved
THE METHOD NAME IS MIS-SPELLED!!!
IT SHOULD BE setHighlightingScheme
String name of the new highligting schemepublic void setText(String text)
string with the new contents for the file. Old contents will be overwritten.
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||