Package io.keikai.axyra.sheets.content
Class RichText
java.lang.Object
io.keikai.axyra.sheets.content.RichText
Rich (multi-run) cell text — a sequence of runs, each with its own optional
font overrides (bold, italic, underline, strike, name, size, color). Apply
with
Cell.setRichText(...); read back with Cell.richText()
and inspect the runs via run(int) / runs(). Crosses the
boundary as a JSON array.
cell.setRichText(RichText.builder()
.run("Total: ")
.run("42", RichText.run().bold().color(Color.RED))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder for a rich-text value.static final classPer-run font overrides, created withrun().static final recordA read-back view of one run: its text plus the font overrides it carries. -
Method Summary
Modifier and TypeMethodDescriptionstatic RichText.Builderbuilder()A builder; add runs in reading order withRichText.Builder.run(String).static RichTextRebuild from the engine's read-back JSON (seeCell.richText()).static RichText.Runrun()A per-run style spec (seeRichText.Run).run(int index) The run atindexas a typed view.intrunCount()Number of runs.runs()Every run as a typed view, in order.text()The flat cell text — the concatenation of every run's text.A builder pre-loaded with this text's runs, for read–modify–write round-trips.toJson()The runs as a JSON array crossed to the engine.
-
Method Details
-
builder
A builder; add runs in reading order withRichText.Builder.run(String). -
toBuilder
A builder pre-loaded with this text's runs, for read–modify–write round-trips. -
run
A per-run style spec (seeRichText.Run). -
toJson
The runs as a JSON array crossed to the engine. -
fromJson
Rebuild from the engine's read-back JSON (seeCell.richText()). -
runCount
public int runCount()Number of runs. -
text
The flat cell text — the concatenation of every run's text. -
run
The run atindexas a typed view.- Parameters:
index- 0-based run index- Throws:
IndexOutOfBoundsException- ifindexis outside[0, runCount())
-
runs
Every run as a typed view, in order.
-