1.1 --- a/src/main/java/org/vaadin/console/Console.java Fri May 20 17:52:09 2011 +0400
1.2 +++ b/src/main/java/org/vaadin/console/Console.java Fri May 20 18:18:38 2011 +0400
1.3 @@ -56,6 +56,9 @@
1.4 client.call("setWrap", wrap);
1.5 }
1.6
1.7 + /**
1.8 + * @return true, if entered by user text immediately will print to console, false otherwise
1.9 + */
1.10 public boolean isPrintPromptOnInput() {
1.11 return config.isPrintPromptOnInput;
1.12 }
1.13 @@ -65,10 +68,18 @@
1.14 client.call("setPrintPromptOnInput", isPrintPromptOnInput);
1.15 }
1.16
1.17 + /**
1.18 + * @return true, if method scrollToEnd will only work if last scroll state was "end"
1.19 + * (like Linux KDE console emulator "Konsole"), false otherwise (by default)
1.20 + */
1.21 public boolean isSmartScrollToEnd() {
1.22 return config.isSmartScrollToEnd;
1.23 }
1.24
1.25 + /**
1.26 + * @param isSmartScrollToEnd if true - method scrollToEnd will only work if last scroll
1.27 + * state was "end" (like Linux KDE console emulator "Konsole"); false by default
1.28 + */
1.29 public void setSmartScrollToEnd(final boolean isSmartScrollToEnd) {
1.30 config.isSmartScrollToEnd = isSmartScrollToEnd;
1.31 client.call("setSmartScrollToEnd", isSmartScrollToEnd);
1.32 @@ -595,12 +606,15 @@
1.33 client.call("println", string, className);
1.34 }
1.35
1.36 + /**
1.37 + * @param string text to append to the last printed line
1.38 + */
1.39 public void append(final String string) {
1.40 client.call("append", string);
1.41 }
1.42
1.43 /**
1.44 - * @param string
1.45 + * @param string text to append to the last printed line
1.46 * @param className CSS class name for string
1.47 */
1.48 public void append(final String string, final String className) {
1.49 @@ -647,6 +661,9 @@
1.50 client.call("scrollToEnd");
1.51 }
1.52
1.53 + /**
1.54 + * Focus input element of console.
1.55 + */
1.56 public void focusInput() {
1.57 client.call("focusInput");
1.58 }