Skip to content

io7m/tabla

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

tabla

Maven Central Maven Central (snapshot) Codecov

tabla

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

tabla

Features

  • Uses a generic constraint solver for table layouts.
  • Written in pure Java 17.
  • OSGi ready.
  • JPMS ready.
  • ISC license.
  • High-coverage automated test suite.

Motivation

Building

$ mvn clean verify

Usage

var builder =
  Table.builder()
    .declareColumn("Item")
    .declareColumn("Description");

builder.addRow()
  .addCell("ca146625-5b90-4478-8ca3-51bce50f4d07")
  .addCell("Structural documentation.")

...
// Add more rows here.
...

var table =
  builder.build();

var lines =
  Tabla.framedUnicodeRenderer()
    .renderLines(table);

for (var line : lines) {
  System.out.println(line);
}
┌──────────────────────────────────────┬────────────────────────────────────────────┐
│ Item                                 │ Description                                │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ ca146625-5b90-4478-8ca3-51bce50f4d07 │ Structural documentation.                  │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 8df7d45d-a6cd-4bd9-8e40-daa1f38d2835 │ A small jar containing a pickled beetroot. │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 6253ab7f-2f0f-4961-9b9d-164b462da266 │ Assorted coat hangers.                     │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 577cfd36-7d2d-41db-a9b9-cf4d4ced9160 │ A silver, decorative clock.                │
└──────────────────────────────────────┴────────────────────────────────────────────┘