![JAR search and dependency download from the Maven repository](/logo.png)
org.fxmisc.richtext.InlineStyleTextArea Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of richtextfx Show documentation
Show all versions of richtextfx Show documentation
Rich-text area for JavaFX
package org.fxmisc.richtext;
import java.util.function.Function;
/**
* Text area that uses inline css derived from the style info to define
* style of text segments.
*
* @param type of style information.
*/
public class InlineStyleTextArea extends StyledTextArea {
/**
*
* @param initialStyle style to use for text ranges where no other
* style is set via {@code setStyle(...)} methods.
* @param styleToCss function that converts an instance of {@code S}
* to a CSS string.
*/
public InlineStyleTextArea(S initialStyle, Function styleToCss) {
super(initialStyle, (text, style) -> text.setStyle(styleToCss.apply(style)));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy