JavaFX中的样式文本? [英] Styled text in JavaFX?

查看:208
本文介绍了JavaFX中的样式文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将聊天客户端从Swing切换到JavaFX,我遇到了一个图形问题。以前,我使用 JTextPane 插入样式文本,但是在切换到FX时,我找不到一个能够执行 JTextPane ,并从这个的答案,我知道FX的 TextPane 也不会做这项工作。对不起,如果这对你Jav​​aFX老兵显而易见,但我似乎找不到任何东西。

I'm switching my chat client over from Swing to JavaFX, and I have run into a graphical problem. Previously, I was using a JTextPane to insert styled text, but upon switching to FX, I could not find a single component capable of doing what the JTextPane did, and from this answer, I know that FX's TextPane will not do the job either. Sorry if this is obvious to you JavaFX veterans, but I can't quite seem to find anything.

请,如果你可以推荐一个这样的组件,非常感激。

Please, if you could recommend a component like this, it would be much appreciated. Thank you in advance.

推荐答案

样式文本将在JavaFX 8(包含在jdk8和jre8中)中提供。

Styled text will be available in JavaFX 8 (included in jdk8 and jre8).

您可以按照多行,多样式,富文本支持问题及其引用的相关问题。

You can track progress by following the Multi-line, multi-style, rich text support issue and the related issues it references.

以下是详情示例

在此期间,请使用 WebView 以显示样式文本和 HTMLEditor 来编辑它。

In the meantime, use a WebView to display styled text and an HTMLEditor to edit it.

或者,您可以在 Flowlight

这篇关于JavaFX中的样式文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆