XTerm Console Addon
Vaadin 14+ Java integration of xterm.js terminal emulator.
Features
- Send input text to server
- Programmatically write to the console
- Clipboard support
- Command line edition (cursor keys, insert, etc.)
- ANSI escape sequences
- And much more...
Found a bug or have a suggestion? Report it on GitHub
For bug reports, feature suggestions, or questions, please open an issue on GitHub. This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
Sample code
XTerm xterm = new XTerm(); xterm.writeln("Hello world.\n\n"); xterm.setCursorBlink(true); xterm.setCursorStyle(CursorStyle.UNDERLINE); xterm.setSizeFull(); xterm.loadFeature(new XTermClipboard(), clipboard->{ clipboard.setCopySelection(true); clipboard.setUseSystemClipboard(UseSystemClipboard.READWRITE); clipboard.setPasteWithRightClick(true); }); xterm.loadFeature(new XTermConsole(), console->{ console.addLineListener(ev->{ String line = ev.getLine(); System.out.println(line); }); xterm.focus(); xterm.getFeature(XTermFit.class).ifPresent(fit->{ fit.fit(); });
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
New features:
- Provide reflection hints for native compilation (#90)
- Released
- 2024-09-02
- Maturity
- TESTED
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24
- Vaadin 23 in 2.2.0
- Vaadin 22 in 2.2.0
- Vaadin 21 in 2.0.1
- Vaadin 14 in 1.0.2
- Browser
- N/A
OSGiMaskedTextField - Vaadin Add-on Directory
OSGiMaskedTextFieldAn extension to the TextField to allow the developer to specify a mask. It's an pure Vaadin/GWT implementation with no external dependencies.
It is still experimental, so if you find any bug or have a suggestion please let me know.
You can use it the same way you use the default TextField, listening to the same events or calling the same methods, the mask is the only difference. The input should satisfy the mask in order to be considered valid.
Currently available masks:
# - any digit
U - upper-case letter
L - lower-case letter
? - any letter
A - any number or character
* - anything
H - hex sign (0-9, a-f or A-F)
' - Escape character, used to escape any of the special formatting characters.
~ - +/- sign
Any character not matching one of the above mask character or if it escaped with the single quote character (') is considered to be a literal.
Some mask examples:
Phone Number: (###) ###-####
USPS Express Mail: EU#########'US
Date / time: ##/##/#### ##:##
State: UU
HTML Color: '#HHHHHH
An capitalized 6 letter word: ULLLLL