-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from hoffman373/master
Added focus and getLineCount methods.
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,7 +226,24 @@ public native String getText() /*-{ | |
return editor.getSession().getValue(); | ||
}-*/; | ||
|
||
|
||
/** | ||
* Causes the editor to gain input focus. | ||
*/ | ||
public native void focus() /*-{ | ||
var editor = [email protected]::editor; | ||
editor.focus(); | ||
}-*/; | ||
|
||
/** | ||
* Retrieves the number of lines in the editor. | ||
* | ||
* @return The number of lines in the editor. | ||
*/ | ||
public native int getLineCount() /*-{ | ||
var editor = [email protected]::editor; | ||
return editor.session.getLength(); | ||
}-*/; | ||
|
||
/** | ||
* Set the complete text in the editor from a String. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters