本文整理汇总了Java中javafx.scene.control.TabPane.setId方法的典型用法代码示例。如果您正苦于以下问题:Java TabPane.setId方法的具体用法?Java TabPane.setId怎么用?Java TabPane.setId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.TabPane
的用法示例。
在下文中一共展示了TabPane.setId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTabPane
import javafx.scene.control.TabPane; //导入方法依赖的package包/类
private TabPane createTabPane() {
tabPane = new TabPane();
tabPane.setId("ConfigurationTabPane");
tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
layouts = mpfConfigurationInfo.getProperties(this);
for (IPropertiesLayout layout : layouts) {
String name = layout.getName();
Tab tab = new Tab(name, layout.getContent());
tab.setId(name);
tab.setGraphic(layout.getIcon());
tabPane.getTabs().add(tab);
}
VBox.setVgrow(tabPane, Priority.ALWAYS);
return tabPane;
}
示例2: MainWindow
import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public MainWindow(String applicationName,
LibraryView library,
ApplicationsView apps,
EnginesView engines,
ContainersView containers,
InstallationsView installations,
SettingsView settings,
ThemeManager themeManager,
JavaFxSettingsManager javaFxSettingsManager) {
super();
this.library = library;
this.apps = apps;
this.engines = engines;
this.containers = containers;
this.settings = settings;
tabPane = new TabPane();
tabPane.setId("menuPane");
tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
tabPane.getTabs().addAll(library, apps, containers, engines, installations, settings);
this.scene = new PhoenicisScene(tabPane, themeManager, javaFxSettingsManager);
this.getIcons().add(new Image(
JavaFXApplication.class.getResourceAsStream("/org/phoenicis/javafx/views/common/phoenicis.png")));
// avoid 1x1 pixel window
this.setMinHeight(200);
this.setMinWidth(200);
this.setResizable(true);
this.setHeight(javaFxSettingsManager.getWindowHeight());
this.setWidth(javaFxSettingsManager.getWindowWidth());
this.setMaximized(javaFxSettingsManager.isWindowMaximized());
this.setScene(scene);
this.setTitle(applicationName);
this.show();
}