Text User Interface Library
Find a file
2025-12-09 12:20:42 -06:00
code #1 Set version to v0.4 2025-12-08 22:03:59 -06:00
wiki #1 Remove Swing backend, enable GraalVM AOT compile 2025-12-08 21:55:29 -06:00
casciian_aot1.png Add screenshot of native binary, notes on tags and licensing 2025-12-09 12:20:42 -06:00
COPYING Initial commit 2025-12-07 08:17:29 -06:00
README.md Add screenshot of native binary, notes on tags and licensing 2025-12-09 12:20:42 -06:00

Casciian - Java Text User Interface library

This library implements a text-based windowing system loosely reminiscent of Borland's Turbo Vision system for Xterm-like terminals.

Casciian can be run inside its own terminal window, with support for all of its features including mouse, and of course more terminals.

Casciian has seen inspiration from several other projects:

  • Translucent windows were inspired by notcurses.

  • Pulsing button text, window effects, and desktop effects were inspired by vtm's incredibly slick game-like aesthetic.

To the extent possible under law, the author(s) of Casciian have dedicated all copyright and related and neighboring rights to Casciian to the public domain worldwide. This software is distributed without any warranty. The COPYING file describes this intent, and provides a public license fallback for those jurisdictions that do not recognize the public domain.

This code base and the wiki documentation have been dedicated to the public domain, and are free for relicense. People are free to replace the copyright headers with whatever works for them -- no need to keep the current name on it. This repository will stay frozen and public domain, in case people need proof that this code really is free for everyone.

The sole exception is the Base64 methods of casciian.bits.StringUtils: these methods are Copyright (c) 2004, Mikael Grev, MiG InfoCom AB (base64 @ miginfocom. com) and released under BSD license. This code can easily be replaced with java.util.Base64 references for projects that will run on Java 1.8 or later.

Tags/Commits In This Repository

Between the initial commit and current git head are four tags, representing the steps taken to remove all dependencies on java.desktop (AWT/Swing) as documented in this issue. Those tags are described below:

Tag Description Of Features
v0.1 Functional parity with Jexer 2.0
v0.2 Images supported in Cells and backends; no UI elements using images
v0.3 Text-only Cells; SWING and XTERM backends both present
v0.4 XTERM only, no AWT/Swing; compilable to native binary with GraalVM

Below is a screenshot of Casciian running as a compiled executable:

Casciian running on SubstrateVM

Running The Demo

src/demo contains official demos showing all of the stock UI controls. The demos can be run as follows:

  • 'java -cp casciian.jar:demo.jar demo.Demo1' . This will use System.in/out with Xterm-like sequences.

  • 'java -cp casciian.jar:demo.jar demo.Demo2 PORT' (where PORT is a number to run the TCP daemon on). This will use the Xterm backend on a telnet server that will update with screen size changes.

  • 'java -cp casciian.jar:demo.jar demo.Demo3' . This will use System.in/out with Xterm-like sequences. One can see in the code how to pass a different InputReader and OutputReader to TApplication, permitting a different encoding than UTF-8; in this case, code page 437.

  • 'java -cp casciian.jar:demo.jar demo.Demo4' . This demonstrates hidden windows and a custom TDesktop.

  • 'java -cp casciian.jar:demo.jar demo.Demo7' . This demonstrates the BoxLayoutManager, achieving a similar result as the javax.swing.BoxLayout apidocs example.

  • 'java -cp casciian.jar:demo.jar demo.Demo8 PORT' (where PORT is a number to run the TCP daemon on). This will use the Xterm backend on a telnet server to share one screen to many terminals.