本文整理汇总了Java中javafx.scene.control.TextArea.setFocusTraversable方法的典型用法代码示例。如果您正苦于以下问题:Java TextArea.setFocusTraversable方法的具体用法?Java TextArea.setFocusTraversable怎么用?Java TextArea.setFocusTraversable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.TextArea
的用法示例。
在下文中一共展示了TextArea.setFocusTraversable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContent
import javafx.scene.control.TextArea; //导入方法依赖的package包/类
@Override
@FXThread
protected void createContent(@NotNull final VBox root) {
super.createContent(root);
final JFXApplication application = JFXApplication.getInstance();
final HostServices hostServices = application.getHostServices();
final GridPane gridPane = new GridPane();
final Label applicationLabel = new Label(Config.TITLE);
applicationLabel.setGraphic(new ImageView(Icons.APPLICATION_64));
final Label versionLabel = new Label(Messages.ABOUT_DIALOG_VERSION + ":");
versionLabel.prefWidthProperty().bind(gridPane.widthProperty().multiply(0.5));
final Label versionField = new Label(Config.STRING_VERSION);
final Label projectHomeLabel = new Label(Messages.ABOUT_DIALOG_PROJECT_HOME + ":");
final Hyperlink projectHomeField = new Hyperlink("bitbucket.org");
projectHomeField.setOnAction(event -> hostServices.showDocument(PROJECT_HOME));
projectHomeField.setFocusTraversable(false);
final Label forumThreadLabel = new Label(Messages.ABOUT_DIALOG_FORUM_THREAD + ":");
final Hyperlink forumThreadField = new Hyperlink("hub.jmonkeyengine.org");
forumThreadField.setOnAction(event -> hostServices.showDocument(FORUM_THREAD));
forumThreadField.setFocusTraversable(false);
final Label usedLibrariesLabel = new Label(Messages.ABOUT_DIALOG_USED_LIBRARIES + ":");
usedLibrariesLabel.prefWidthProperty().bind(gridPane.widthProperty());
final Label usedIcons = new Label(Messages.ABOUT_DIALOG_USED_ICONS + ":");
usedIcons.prefWidthProperty().bind(gridPane.widthProperty());
final TextArea librariesArea = new TextArea(LIBRARIES);
librariesArea.setEditable(false);
librariesArea.setFocusTraversable(false);
final TextArea iconsArea = new TextArea(ICONS);
iconsArea.setEditable(false);
iconsArea.setFocusTraversable(false);
gridPane.add(applicationLabel, 0, 0, 2, 1);
gridPane.add(versionLabel, 0, 1, 1, 1);
gridPane.add(versionField, 1, 1, 1, 1);
gridPane.add(projectHomeLabel, 0, 2, 1, 1);
gridPane.add(projectHomeField, 1, 2, 1, 1);
gridPane.add(forumThreadLabel, 0, 3, 1, 1);
gridPane.add(forumThreadField, 1, 3, 1, 1);
gridPane.add(usedLibrariesLabel, 0, 4, 2, 1);
gridPane.add(librariesArea, 0, 5, 2, 1);
gridPane.add(usedIcons, 0, 6, 2, 1);
gridPane.add(iconsArea, 0, 7, 2, 1);
FXUtils.addToPane(gridPane, root);
FXUtils.addClassTo(root, CSSClasses.ABOUT_DIALOG);
FXUtils.addClassTo(gridPane, CSSClasses.DEF_GRID_PANE);
FXUtils.addClassTo(usedLibrariesLabel, usedIcons, CSSClasses.ABOUT_DIALOG_LONG_LABEL);
FXUtils.addClassesTo(versionLabel, projectHomeLabel, forumThreadLabel, usedLibrariesLabel, usedIcons,
versionField, projectHomeField, forumThreadField, CSSClasses.SPECIAL_FONT_16);
FXUtils.addClassTo(applicationLabel, CSSClasses.ABOUT_DIALOG_TITLE_LABEL);
}