Termite is a base library to build a Text-based User Interface
Find a file
2026-07-10 18:50:39 +09:00
.idea Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
build-logic Remove obsolete comments from Maven publication configuration. 2026-07-10 18:50:39 +09:00
components Refactor components for enhanced modularity and extensibility; update handling for layouts, labels, and builders. 2026-07-10 18:49:04 +09:00
example Refactor components for enhanced modularity and extensibility; update handling for layouts, labels, and builders. 2026-07-10 18:49:04 +09:00
gradle Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
tui Introduce builder support across components; streamline initialization and enhance modularity. 2026-07-10 15:19:00 +09:00
.gitattributes Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
.gitignore Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
ANSI Escape Code.md Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
gradle.properties Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
gradlew Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
gradlew.bat Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
LICENSE Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
README.md Introduce builder support across components; streamline initialization and enhance modularity. 2026-07-10 15:19:00 +09:00
settings.gradle.kts Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
Terminal Mode.md Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
termite.png Initial commit: Setup Termite TUI Engine with core components and ANSI rendering support. 2026-07-09 14:47:59 +09:00
TODO.md Refactor Dialog to enhance modularity and focus management; add DialogBuilder for streamlined creation. 2026-07-10 13:52:57 +09:00

Termite

Project Termite is a text-based user interface library for Java.

Termite TUI

TUI

Usage

repositories {
    maven {
        name = "Elex Repository"
        url = "https://artifacts.elex-project.com/repository/maven/"
    }
}
dependencies {
    implementation("com.elex_project:termite:1.0.0")
}
final Termite termite = new Termite();
termite.setListener(new Termite.Listener() {
    @Override
    public void onStart(Termite termite) {
        //
    }

    @Override
    public void onRender(Termite termite) {
        //
    }

    @Override
    public void onKeyInput(KeyEvent key, Termite termite) {
        switch (key.type()) {
            case Key.ESCAPE, Key.CTRL_C:
                termite.stop();
                break;
            case Key.ENTER:
                //
            case Key.CHARACTER:
                //
            default:
                //
        }
    }
});

termite.start();

Components

Usage

repositories {
    maven {
        name = "Elex Repository"
        url = "https://artifacts.elex-project.com/repository/maven/"
    }
}
dependencies {
    implementation("com.elex_project:termite-components:1.0.0")
}
final TextView textView = Builder.textView()
        .text("Hello, Termite!")
        .layoutWeight(1)
        .build();
final SplitPanel mainPanel = Builder.splitPanel()
        .title("Termite! TUI")
        .splitRatio(0.3)
        .layoutWeight(1)
        .border(Border.ROUNDED, Color.DEFAULT.getCode())
        .addSecond(textView)
        .build();
final Window window = Builder.window()
        .onStart(termite -> {
            mainPanel.setSize(termite.getWidth(), termite.getHeight());
        })
        .onRender(termite -> {})
        .onKeyInput((key, termite) -> {})
        .onStop(termite -> {})
        .add(mainPanel)
        .build();
window.start();