FXML完全参考? [英] FXML full reference?

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

问题描述

我正在尝试学习JavaFX 2.0 + FXML,我发现制作fxml文件有点不舒服,却不知道我能放入什么,我不能。我的意思是FXML中哪些标签是可能的,哪些属性是evety标签?值evety属性可以具有哪些值,等等。
网上有一些例子,但它们没有显示FXML的漏洞功能。
我曾尝试将NetBeans和Eclipse插件用于JavaFX 2.0,但是,它们都没有FXML的任何内容,它们只是验证开放式标签和其他简单的东西,这是evety XML编辑器可以做到的。也许我错误地配置了这些插件。
那么,FXML中是否有完整的参考文献(所有标签,属性及其可能的值)?

I'm trying to learn JavaFX 2.0 + FXML, and i found it kind of uncomfortable to make fxml file, without knowing what i can put in it and what i can't. I mean which tags are possible in FXML, which attributes evety tag has? which values evety attribute can have, and so on. There are some examples in a web, but they don't show the hole capabilities of FXML. I've tried to use NetBeans and Eclipse plugins for JavaFX 2.0, but, both of them does not have any intelences for FXML, they just validate open-close tags and other simple things, which evety XML editor can do. Maybe i've configured these plugins wrongly. So, is there any documentatin with full reference (all tags, attributes and its possible values) of FXML?

推荐答案

FXML参考

FXML简介描述了标记的语法和使用模式,对学习FXML很重要。它没有定义FXML中可用的所有元素。

Introduction to FXML describes the syntax and usage patterns of the markup and is important to study when learning FXML. It does not define all elements usable in FXML.

FXML永远不会有完整的引用(也不是xml模式),因为它通过反映类路径中的Java类来工作并根据类的属性定义元素和属性。

There will never be a full reference (nor xml schema) for FXML as it works by reflecting on Java classes in the classpath and defining elements and attributes based on the properties of the classes.

FXML的创建者(Greg Brown)建议:

FXML's creator (Greg Brown) suggests:


所以目前 Javadoc 是最佳参考。

对于JavaFX的未来Javadoc修订版,JavaFX团队正在考虑在Javadoc中包含FXML示例。

For future Javadoc revisions of JavaFX, the JavaFX team is considering including FXML examples in the Javadoc.

此论坛主题此论坛帖子包含有关fxml文档的讨论和链接。

This forum thread and this forum thread contains discussions about and links to fxml documentation.

IDE中的FXML代码完成

  • NetBeans 7.3 provides FXML code completion.
  • The defacto JavaFX eclipse plugin e(fx)clipse provides FXML code completion.
  • Intellij Idea 12.1 provides FXML code completion.

这些IDE推理引擎通过反映Java类来完成与FXML实现相同的工作。

These IDE inference engines work by reflecting on Java classes the same way the FXML implementation does.

当您使用像 ControlsFX 这样的库时,或者开发自己的JavaFX组件,IDE代码完成能够利用您创建或链接的新类和属性。

When you use a library like ControlsFX, or develop your own JavaFX components, the IDE code completion is able to make use of the new classes and attributes you have created or linked.

这篇关于FXML完全参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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