本文整理匯總了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();
}