Watch
2
0
Fork
You've already forked jpita
0
Plain interesting text alignment
  • Java 99.8%
  • CSS 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-31 18:42:55 +01:00
.forgejo Update workflows. 2026-07-31 18:42:55 +01:00
com.io7m.jpita.core Move to new organization. 2024-04-30 20:06:27 +00:00
com.io7m.jpita.tests Move to new organization. 2024-04-30 20:06:27 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:04 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:44 +00:00
.gitmodules Move to new organization. 2024-04-30 20:06:27 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:47 +01:00
pom.xml Migrate project. 2026-06-27 10:10:37 +01:00
README-CHANGES.xml Move to new organization. 2024-04-30 20:06:27 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:07:24 +00:00
README.in Migrate project. 2026-06-27 10:10:37 +01:00
README.md Migrate project. 2026-06-27 10:10:37 +01:00

jpita

Maven Central Maven Central (snapshot) Java Version

com.io7m.jpita

jpita

Java functions to align and justify plain text.

Features

  • Full justification (flush left, flush right).
  • Left alignment (flush left, ragged right).
  • High coverage test suite.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Usage

Add a series of words to a JPAlignerType instance:

var a = JPAlignerBasic.create(80);

a.addWord("Hello");
a.addWord("World");
var s = a.finish();
var a = JPJustifierBasic.create(OVERFLOW_ANYWAY, JUSTIFY_UNDER_HALF, 80);

a.addWord("Hello");
a.breakLine();
a.addWord("World");
var s = a.finish();

The result of finish() is a list of justified and/or aligned lines of text.