Skip to main content
Image

r/java


Clique 4.0.3 - Zero deps CLI styling library for Java
Clique 4.0.3 - Zero deps CLI styling library for Java

So what's Clique?

If you missed my older posts, Clique is essentially a zero-dependency CLI styling library for Java that is GraalVM compatible, no-color.org compliant.

What's new in 4.0.3:

You can now build a table straight from data you already have

SequencedCollection<List<String>> rows = List.of(
    List.of("Name", "Age", "Class"),
    List.of("John", "25", "Class A"),
    List.of("Doe", "26", "Class B")
);

Clique.table(TableType.ASCII)
    .fromRows(rows)
    .render();

This also applies to column based data

SequencedMap<String, List<String>> map = new LinkedHashMap<>();
map.put("Name", List.of("John", "Doe"));
map.put("Age", List.of("25", "26"));

Clique.table(TableType.ASCII)
    .fromColumns(map)
    .render();

These were mainly added to simplify creating Tables from existing collections

StyleContext#fromTheme - scope a registered theme's colors into a StyleContext in one call

StyleContext ctx = StyleContext.fromTheme("catppuccin-mocha");

Other minor changes:

I've also deprecated the Collection-based headers()/row() overloads in favor of Java 21 SequencedCollection; reason being that Collection doesn't guarantee order, which could silently mess up your column/row order and was essentially a footgun. Worth migrating if that bothers you.

GitHub: https://github.com/kusoroadeolu/Clique

Demos: https://github.com/kusoroadeolu/clique-demos


Advertisement: Got questions about Michelin motorsport, racing, or high-performance tire tech? Join Raymond Cotton and Casey Halbrook for a live AMA on August 13 from 1–3 PM ET. Ask us anything.
Got questions about Michelin motorsport, racing, or high-performance tire tech? Join Raymond Cotton and Casey Halbrook for a live AMA on August 13 from 1–3 PM ET. Ask us anything.
Image Got questions about Michelin motorsport, racing, or high-performance tire tech? Join Raymond Cotton and Casey Halbrook for a live AMA on August 13 from 1–3 PM ET. Ask us anything.


Java | The Documentary
Java | The Documentary

Ecógrafo
Ecógrafo

Hello community, This is my real-time ultrasound signal simulation and processing system developed entirely in Java using Java Swing.

The project enables both the mathematical simulation of acoustic echoes from biological tissues and the reception and interpretation of raw (RF) data from actual hardware via UDP sockets.

I still need to build an ultrasonic sensor to send data via UDP; I tried using ultrasonic modules, but they aren't useful—all I see on the screen is a barrier indicating the proximity of a nearby object.

Once the sensor's fabrication is complete, I will conduct tests and submit it to a clinical evaluation by experts to validate its utility in real-world settings—so stay tuned.