Skip to content

Commit

Permalink
Added focus and getLineCount methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffman373 committed Feb 9, 2015
1 parent d052711 commit 41a1fd8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 41a1fd8

Please sign in to comment.