Console add-on sources

Where can I get sources of
add-on? I mean VCS repository (subversion, mercurial, git, etc.) with pom or eclipse project which i could modify.

Hi! The sources are included in the jar file, but I will make them available online at some point.

Ok. I modified this add-on and added some useful functionality in version 1.1.8:

  • append(String string)
    : append text to the last printed line;

  • println(String string, String className)
    append(String string, String className)
    : print and append text with predefined in theme CSS class;

  • setSmartScrollToEnd(boolean isSmartScrollToEnd)
    : if set true, method scrollToEnd will only work if last scroll state was “end” (like Linux KDE terminal emulator “Konsole”);

  • focusInput()
    : focus input element of console;

  • newLineIfNotEndsWithNewLine()
    : print new line only if new line not exists at the end of console;

  • setPrintPromptOnInput(boolean isPrintPromptOnInput)
    : if true - entered by user text immediately will be printed to console, nothing happens otherwise (but command will sent to the server);

  • some other fixies

I made this changes to use console add-on like “chat”.
11703.png (27.3 KB)
11705.jar (86.3 KB)

Console 1.2.0:

ANSI code converter disabled by default. You can enable converter by calling setConvertANSIToCSS(true) method. Only font-colors and background-colors processed by default (DefaultANSICodeConverter class), but you can define your ANSICodeConverter class and set it in Console object by calling setANSIToCSSConverter(ANSICodeConverter converter) method.

For example, next screenshots contain a linux console with telnet output and a Console add-on object which print the same raw output from telnet protocol (including ANSI codes) at the WEB.
11722.jar (92.4 KB) (30.5 KB)

This looks really really cool. I truly hope Sami will integrate it to the console.

Yes, very nice! The ANSI colors were also on my TODO-list, so I’d be glad to integrate them to Console. Hopefully, during this week I have the time to do something about this…

Any news with Vaadin 7 port?

I began porting here:

Untested 1.3.0 version is now available.

Is there a way to implement ANSI escape sequences for line change / cursor movement etc?