Class TextSignature
java.lang.Object
com.nsdev.lettergenerator.signature.TextSignature
- All Implemented Interfaces:
SignatureContent
Immutable plain-text signature part: single newlines change lines and blank lines separate
paragraphs. Form-feed page breaks are forbidden. Instances can be safely reused;
style(Style) returns a new part rather than changing the receiver.-
Method Summary
Modifier and TypeMethodDescriptionblocks()Exposes the ordered immutable blocks represented by this signature part.static TextSignatureCreates a signature with inherited document typography and no explicit style overrides.Creates a copy with replacement style overrides for all signature paragraphs.
-
Method Details
-
of
Creates a signature with inherited document typography and no explicit style overrides. CRLF and CR are normalized when producing paragraph blocks.- Parameters:
text- non-null plain text without form-feed page breaks- Returns:
- a new immutable text signature
- Throws:
IllegalArgumentException- if text is null or contains a form-feed page break
-
style
Creates a copy with replacement style overrides for all signature paragraphs. Unspecified fields inherit document typography; passing null removes explicit overrides. Detailed style validity is checked when generating the PDF.- Parameters:
style- paragraph style overrides, or null to inherit the document style- Returns:
- a new signature; this instance is unchanged
-
blocks
Exposes the ordered immutable blocks represented by this signature part. Text parts produce paragraphs; image parts produce one fitted image block.- Specified by:
blocksin interfaceSignatureContent- Returns:
- immutable signature blocks, in display order
-