更新时间:2022-11-19 08:08:50
如果问题只是让您的自定义类在 SceneBuilder 中可用,您可以通过以下步骤来实现:
If the issue is just to make your custom class available in SceneBuilder, you can do so with the following steps:
Annotation
)捆绑为一个 jar 文件PaneWithSelectionListener
) 中访问的类被选中PaneWithSelectionListener
现在将出现在左窗格中自定义"下的 SceneBuilder 中:Annotation
) as a jar filePaneWithSelectionListener
) is checkedPaneWithSelectionListener
will now appear in SceneBuilder under "Custom" in the left pane:
您会注意到 SceneBuilder 中的下拉菜单有一个自定义库文件夹"选项,您可以从中打开存储 jar 文件的文件夹.对于快速选项,您可以将 jar 文件复制到此文件夹中,并且(经过短暂延迟后),所包含的类将出现在自定义"列表中.
You'll notice the drop-down in SceneBuilder has a "Custom Library Folder" option, from which you can open the folder where the jar files are stored. For a quick option, you can just copy jar files to this folder and (after a short delay), the contained classes will appear in the "Custom" list.