简体   繁体   English

javafx场景构建器2.0中的filechooser在哪里?我找不到它

[英]Where is filechooser in javafx scene builder 2.0? I can't find it

I have java jdk 7.65, sdk 7.65. 我有java jdk 7.65,sdk 7.65。 Where is filechooser in javafx scene builder 2.0? javafx场景构建器2.0中的filechooser在哪里? I can't find it. 我找不到它。

SceneBuilder is for building a Scene graph, ie for creating nodes and adding them to a root container that is intended to be added to a Scene . SceneBuilder用于构建场景图,即用于创建节点并将其添加到旨在添加到Scene的根容器中。

FileChooser is not a Node ; FileChooser不是Node ; it cannot be placed in Scene graph; 它不能放在场景图中; so it really wouldn't make sense to include it in SceneBuilder. 所以将它包含在SceneBuilder中真的没有意义。 The typical use of a FileChooser is that it's shown in response to the user action, such as pressing a button. FileChooser的典型用法是响应用户操作而显示,例如按下按钮。 This would be done in a handler method, not in the construction of the UI. 这将在处理程序方法中完成,而不是在UI的构造中完成。

In other words, it's not really clear what you would do with a FileChooser if it were available in SceneBuilder. 换句话说,如果FileChooser在SceneBuilder中可用,那么你用它做什么并不是很清楚。

Where is filechooser in javafx? javafx中的filechooser在哪里?

The FileChooser class is located in the javafx.stage package. FileChooser类位于javafx.stage包中。


File Chooser 文件选择器

This chapter explains how to use the FileChooser class to enable users to navigate the file system. 本章介绍如何使用FileChooser类使用户能够导航文件系统。 The samples provided in this chapter explain how to open one or several files, configure a file chooser dialog window, and save the application content. 本章提供的示例说明了如何打开一个或多个文件,配置文件选择器对话框窗口以及保存应用程序内容。

Unlike other user interface component classes, the FileChooser class does not belong to the javafx.scene.controls package. 与其他用户界面组件类不同,FileChooser类不属于javafx.scene.controls包。 However, this class deserves to be mentioned in the JavaFX UI Controls tutorial, because it supports one of the typical GUI application functions: file system navigation. 但是,这个类值得在JavaFX UI Controls教程中提及,因为它支持典型的GUI应用程序功能之一:文件系统导航。

The FileChooser class is located in the javafx.stage package along with the other basic root graphical elements, such as Stage, Window, and Popup. FileChooser类与其他基本根图形元素(如Stage,Window和Popup)一起位于javafx.stage包中。

Source Using JavaFX UI Controls 使用JavaFX UI控件的源代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM