如何在JavaFX 2.0中为按钮和其他元素创建skin(fxml)? [英] How to create skins(fxml) for buttons and other elements in JavaFX 2.0?

查看:173
本文介绍了如何在JavaFX 2.0中为按钮和其他元素创建skin(fxml)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人从中可以学习或看到如何使用JavaFX 2.0中的fxml文件为按钮,单选按钮,滚动条等创建外观的链接.

I am wondering if anyone has or knows a link from where I can learn or see how to create skins for buttons, radio buttons, scrollbars etc. using fxml files in JavaFX 2.0.

我在学校有这份作业,我希望它做得很好,所以我尝试做所有类似公司应用程序的工作,并为按钮和其他元素添加外观.

I have this homework for school and I want it built very well, so I try to do everything like a corporative application, with skins for buttons and other elements.

我将非常感谢您的帮助.

I would really appreciate any help.

大家好,已经有一段时间了,我现在对JavaFX有了更多的了解,现在回首,我看到它听起来多么愚蠢,请原谅我对我的不尊重和详尽的问题.无论如何,stackoverflow确保了我永远不会再问任何问题.

Hi everyone, it has been a while, and i know more now about JavaFX and now when i look back, i see how stupid it sounds, please just forgive me for disrespect and for poor detailed question. Anyway stackoverflow made sure i will never ask any question again.

推荐答案

在询问之前,您应该更喜欢先搜索网络.这是我的一些结果,需要花一点努力才能找出:

You should to prefer search the net first before asking. Here are some results of mine which took a little effort to find out:

  • Firstly, intro to Skinning Architecture in JavaFX to understand what is going on.
  • Another intro about JavaFX 2.0 Layout: A Class Tour, to understand distinctions between Group, Region and Control. Since Control implements Skinnable, you may want to add this intro to your bachelor work.
  • And here first try of JavaFX 2.0 Custom Control.
  • Finally, dig the code of open source project JFXtras. You will find there a bunch of custom controls as reference.

这篇关于如何在JavaFX 2.0中为按钮和其他元素创建skin(fxml)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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