當前位置: 首頁>>代碼示例>>Java>>正文


Java TabPane.setId方法代碼示例

本文整理匯總了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;
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:16,代碼來源:MPFConfigurationStage.java

示例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();
}
 
開發者ID:PhoenicisOrg,項目名稱:POL-POM-5,代碼行數:40,代碼來源:MainWindow.java


注:本文中的javafx.scene.control.TabPane.setId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。