applyStyleRuns

fun StyledDocument.applyStyleRuns(runs: List<StyleRun>, replace: Boolean = true)

Apply all style runs to the receiver. Each style name is treated as a comma-separated composite. Rendered styles compose rather than replace. Must be invoked on the Swing UI thread.

Parameters

runs

The style runs to apply to the document.

replace

Indicates whether or not the previous attributes should be cleared before the new attributes as set. If true, the operation will replace the previous attributes entirely. If false, the new attributes will be merged with the previous attributes.