Swing 中的 Furigana(或 GUI 替代品......) [英] Furigana in Swing (Or GUI Alternatives ...)

查看:29
本文介绍了Swing 中的 Furigana(或 GUI 替代品......)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单来说,我找不到在 JLabel 中轻松显示假名的方法.

Put simple, I cannot find a way to easily display furigana in a JLabel.

记录:

Furigana(振り仮名?)是日本读物援助,由较小的假名组成,或音节字符,印在 a 旁边汉字(表意字符)或其他字符来表示其发音.在横向文本中,yokogaki,它们被放置在一行文本,而在垂直文本中,tategaki,他们被放在右边文本行,如图所示以下.它是一种类型的 ruby​​ 文本.Furigana 也被称为 yomigana(読み仮名?) 或 rubi (ルビ?).

Furigana (振り仮名?) is a Japanese reading aid, consisting of smaller kana, or syllabic characters, printed next to a kanji (ideographic character) or other character to indicate its pronunciation. In horizontal text, yokogaki, they are placed above the line of text, while in vertical text, tategaki, they are placed to the right of the line of text, as illustrated below. It is one type of ruby text. Furigana are also known as yomigana (読み仮名?) or rubi (ルビ?) in Japanese.

在 XHTML 中,Ruby Annotation 元素支持此功能,反过来,Swing 有限的 HTML 呈现功能不支持这一点.

In XHTML this is supported with the Ruby Annotation element, which is - in turn - not supported by Swing's limited HTML rendering capabilities.

我最近尝试通过在 JPanel 中堆叠多个 JLabel 元素来创建一个能够处理 Ruby Annotation 元素的 JRubyLabel 类- 但是,我对 Swing 不是很熟悉,所以从某种意义上说,我觉得我把事情复杂化了.

I've recently tried to create a JRubyLabel class, capable of handeling Ruby Annotation elements, by stacking multiple JLabel elements in a JPanel - however, I am not so very familiar with Swing, so in a sense I feel like I'm over-complicating things.

我的问题是,按优先顺序排列:

My questions thus are, in order of preference:

  • Swing 是否支持显示 ruby​​ 文本?
  • 您能看到在 Swing 中实现 ruby​​ 文本的更简单或更好的方法吗?
  • 最后,是否还有其他 GUI 程序(最好是 Java)支持 ruby​​ 文本?

推荐答案

Itadaki Source Forge 项目支持Java Swing 中的 Furigana.

Itadaki Source Forge project supports Furigana in Java Swing.

这篇关于Swing 中的 Furigana(或 GUI 替代品......)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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