src/main/java/org/vaadin/console/Console.java
changeset 10 1f81f87f3283
parent 9 dbc3bbf10535
child 11 370ee982fe40
equal deleted inserted replaced
9:dbc3bbf10535 10:1f81f87f3283
    54     public void setWrap(final boolean wrap) {
    54     public void setWrap(final boolean wrap) {
    55         config.wrap = wrap;
    55         config.wrap = wrap;
    56         client.call("setWrap", wrap);
    56         client.call("setWrap", wrap);
    57     }
    57     }
    58 
    58 
       
    59 	/**
       
    60 	 * @return true, if entered by user text immediately will print to console, false otherwise
       
    61 	 */
    59 	public boolean isPrintPromptOnInput() {
    62 	public boolean isPrintPromptOnInput() {
    60 		return config.isPrintPromptOnInput;
    63 		return config.isPrintPromptOnInput;
    61 	}
    64 	}
    62 
    65 
    63 	public void setPrintPromptOnInput(final boolean isPrintPromptOnInput) {
    66 	public void setPrintPromptOnInput(final boolean isPrintPromptOnInput) {
    64 		config.isPrintPromptOnInput = isPrintPromptOnInput;
    67 		config.isPrintPromptOnInput = isPrintPromptOnInput;
    65 		client.call("setPrintPromptOnInput", isPrintPromptOnInput);
    68 		client.call("setPrintPromptOnInput", isPrintPromptOnInput);
    66 	}
    69 	}
    67 
    70 
       
    71 	/**
       
    72 	 * @return true, if method scrollToEnd will only work if last scroll state was "end" 
       
    73 	 * (like Linux KDE console emulator "Konsole"), false otherwise (by default)
       
    74 	 */
    68 	public boolean isSmartScrollToEnd() {
    75 	public boolean isSmartScrollToEnd() {
    69 		return config.isSmartScrollToEnd;
    76 		return config.isSmartScrollToEnd;
    70 	}
    77 	}
    71 
    78 
       
    79 	/**
       
    80 	 * @param isSmartScrollToEnd if true - method scrollToEnd will only work if last scroll 
       
    81 	 * state was "end" (like Linux KDE console emulator "Konsole"); false by default
       
    82 	 */
    72 	public void setSmartScrollToEnd(final boolean isSmartScrollToEnd) {
    83 	public void setSmartScrollToEnd(final boolean isSmartScrollToEnd) {
    73 		config.isSmartScrollToEnd = isSmartScrollToEnd;
    84 		config.isSmartScrollToEnd = isSmartScrollToEnd;
    74 		client.call("setSmartScrollToEnd", isSmartScrollToEnd);
    85 		client.call("setSmartScrollToEnd", isSmartScrollToEnd);
    75 	}
    86 	}
    76 
    87 
   593 	 */
   604 	 */
   594 	public void println(final String string, final String className) {
   605 	public void println(final String string, final String className) {
   595 		client.call("println", string, className);
   606 		client.call("println", string, className);
   596 	}
   607 	}
   597     
   608     
       
   609     /**
       
   610      * @param string text to append to the last printed line 
       
   611      */
   598     public void append(final String string) {
   612     public void append(final String string) {
   599     	client.call("append", string);
   613     	client.call("append", string);
   600     }
   614     }
   601 
   615 
   602 	/**
   616 	/**
   603 	 * @param string
   617 	 * @param string text to append to the last printed line
   604 	 * @param className CSS class name for string
   618 	 * @param className CSS class name for string
   605 	 */
   619 	 */
   606 	public void append(final String string, final String className) {
   620 	public void append(final String string, final String className) {
   607 		client.call("append", string, className);
   621 		client.call("append", string, className);
   608 	}
   622 	}
   645 
   659 
   646     public void scrollToEnd() {
   660     public void scrollToEnd() {
   647         client.call("scrollToEnd");
   661         client.call("scrollToEnd");
   648     }
   662     }
   649     
   663     
       
   664     /**
       
   665      * Focus input element of console.
       
   666      */
   650     public void focusInput() {
   667     public void focusInput() {
   651     	client.call("focusInput");
   668     	client.call("focusInput");
   652     }
   669     }
   653 
   670 
   654     /**
   671     /**