We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
我找到了 Nimbus 外观中使用的资源键的官方列表:
http://docs。 oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html
以及官方组件属性:
http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
这是另一个令人筋疲力尽的列表(与 Nimbus 无关)。 这是来源。
I found the official list of resource keys used in the Nimbus Look and feel:
http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html
And the official component properties:
http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/synth/doc-files/componentProperties.html
And here is another exhausting list (not Nimbus related). This is the source.
无论如何,您可以找到一个更高级的版本,其中所有属性都显示在 GUI 中,每个组件都位于选项卡式窗格中的单独选项卡上。您还可以更改 LAF。查看 UIManager 默认值。
For what it's worth, you can find a fancier version of this where all the properties are displayed in a GUI with each component on a separate tab in a tabbed pane. You can also change the LAF. Check out UIManager Defaults.
这取决于 Java 的实现。这是一个简单的代码,您可以运行它来查看所有可用属性及其当前值。
It depends on the Java implementation. Here is the simple code that you can run to see all available properties and their current values.
之前发布的代码只是获取当前外观设置的属性,默认情况下是金属 l&f。
它列出了我的系统(带有 Java 1.6.0_17 的 WinXP)上总共 636 个定义的属性,在 Windows L&F 和 Motif L&F 上定义的属性较少。我在互联网上找到了另一个列表(http://www.java2s.com/ Tutorial/Java/0240__Swing/ListingUIDefaultProperties.htm),其中找到了 795 个。
所以我认为问题仍然存在:有哪些属性?显然,即使 Metal L&F 也没有全部设置(或者导致 795 的代码是错误的)。
我感到困惑的是,似乎不存在太阳的官方列表,这将是我真正在寻找的东西(如果我的问题正确的话,还有OP)。
The code posted before just gets the properties set by the current look&feel which is the metal l&f by default.
It lists a total of 636 defined properties on my system (WinXP with Java 1.6.0_17) with less defined on Windows L&F and Motif L&F. I found another list on the internet (http://www.java2s.com/Tutorial/Java/0240__Swing/ListingUIDefaultProperties.htm) where 795 are found.
So I think the question still remains: Which properties are there? Obviously, even the Metal L&F doesn't set them all (or the code resulting in 795 is wrong).
I am puzzled by the fact there doesn't seem to exist an official list by sun, which would be what I really am looking for (as well as the OP if I got the question right).
我遇到了类似的问题,很少有 UI 元素以小字体显示。我已使用下面的代码打印了所有键并更新了特定元素
I had a similar issue where few UI elements were displaying in tiny fonts. I have printed all the keys using below code and updated the specific elements