src/main/java/org/vaadin/console/client/ui/TextConsoleConfig.java
author indvdum
Fri, 20 May 2011 17:52:09 +0400
changeset 9 dbc3bbf10535
parent 4 27bd1032a5c6
permissions -rw-r--r--
+ new option - setSmartScrollToEnd: scrollToEnd work only if last scroll state is was "end"
     1 package org.vaadin.console.client.ui;
     2 
     3 import com.google.gwt.core.client.JavaScriptObject;
     4 
     5 public class TextConsoleConfig extends JavaScriptObject {
     6 
     7     public static TextConsoleConfig newInstance() {
     8         return JavaScriptObject.createObject().cast();
     9     }
    10 
    11     protected TextConsoleConfig() {
    12     }
    13 
    14     public final native int getCols() /*-{
    15                                       return this.cols;
    16                                       }-*/;
    17 
    18     public final native void setCols(int cols) /*-{
    19                                                this.cols = cols;
    20                                                }-*/;
    21 
    22     public final native int getRows() /*-{
    23                                       return this.rows;
    24                                       }-*/;
    25 
    26     public final native void setRows(int rows) /*-{
    27                                                this.rows = rows;
    28                                                }-*/;
    29 
    30     public final native void setGreeting(String greeting) /*-{
    31                                                           this.greeting = greeting;
    32                                                           }-*/;
    33 
    34     public final native String getGreeting() /*-{
    35                                              return this.greeting;
    36                                              }-*/;
    37 
    38     public final native void setWrap(boolean w) /*-{
    39                                                 this.wrap = w;
    40                                                 }-*/;
    41 
    42     public final native boolean isWrap() /*-{
    43                                           return this.wrap;
    44                                           }-*/;
    45     
    46     public final native void setPrintPromptOnInput(boolean p) /*-{
    47                                                 this.PrintPromptOnInput = p;
    48                                                 }-*/;
    49     
    50     public final native boolean isPrintPromptOnInput() /*-{
    51                                           return this.PrintPromptOnInput;
    52                                           }-*/;
    53     
    54     public final native void setSmartScrollToEnd(boolean s) /*-{
    55                                                 this.isSmartScrollToEnd = s;
    56                                                 }-*/;
    57     
    58     public final native boolean isSmartScrollToEnd() /*-{
    59                                           return this.isSmartScrollToEnd;
    60                                           }-*/;
    61     
    62     public final native void setScrolledToEnd(boolean s) /*-{
    63                                                 this.isScrolledToEnd = s;
    64                                                 }-*/;
    65     
    66     public final native boolean isScrolledToEnd() /*-{
    67                                           return this.isScrolledToEnd;
    68                                           }-*/;
    69 
    70     public final native void setPs(String ps) /*-{
    71                                               this.ps = ps;
    72                                               }-*/;
    73 
    74     public final native String getPs() /*-{
    75                                        return this.ps;
    76                                        }-*/;
    77 
    78     public final native int getMaxBufferSize() /*-{
    79                                                return this.bufferRows;
    80                                                }-*/;
    81 
    82     public final native void setMaxBufferSize(int rows) /*-{
    83                                                         this.bufferRows = rows;
    84                                                         }-*/;
    85 
    86 }