General -> Appearance -> Colors and Fonts? I\'m implementing a table-v" />
开发者

Obtaining the Eclipse text font

开发者 https://www.devze.com 2022-12-08 21:00 出处:网络
How do I get a Font object representing the font set as the \"Text Font\" in the Eclipse Pre开发者_StackOverflow中文版ferences -> General -> Appearance -> Colors and Fonts? I\'m implementing a table-v

How do I get a Font object representing the font set as the "Text Font" in the Eclipse Pre开发者_StackOverflow中文版ferences -> General -> Appearance -> Colors and Fonts? I'm implementing a table-view where one of the columns is supposed to contained fixed-width text.


This turned out to be easier than expected. The font is obtained like this:

    font = JFaceResources.getTextFont();

There are similar methods for dialog and banner fonts.

0

精彩评论

暂无评论...
验证码 换一张
取 消