All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fxmisc.richtext.InlineStyleTextArea Maven / Gradle / Ivy

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.
 * @deprecated
 */
@Deprecated
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(PS initialParagraphStyle, Function paragraphStyleToCss, S initialStyle, Function styleToCss) {
        super(initialParagraphStyle, (paragraph, style) -> paragraph.setStyle(paragraphStyleToCss.apply(style)),
                initialStyle, (text, style) -> text.setStyle(styleToCss.apply(style))
        );
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy