当前位置: 首页>>代码示例>>Java>>正文


Java TabPane.setTabClosingPolicy方法代码示例

本文整理汇总了Java中javafx.scene.control.TabPane.setTabClosingPolicy方法的典型用法代码示例。如果您正苦于以下问题:Java TabPane.setTabClosingPolicy方法的具体用法?Java TabPane.setTabClosingPolicy怎么用?Java TabPane.setTabClosingPolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.control.TabPane的用法示例。


在下文中一共展示了TabPane.setTabClosingPolicy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TabSample

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public TabSample() {
    BorderPane borderPane = new BorderPane();
    final TabPane tabPane = new TabPane();
    tabPane.setPrefSize(400, 400);
    tabPane.setSide(Side.TOP);
    tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
    final Tab tab1 = new Tab();
    tab1.setText("Tab 1");
    final Tab tab2 = new Tab();
    tab2.setText("Tab 2");
    final Tab tab3 = new Tab();
    tab3.setText("Tab 3");
    final Tab tab4 = new Tab();
    tab4.setText("Tab 4");
    tabPane.getTabs().addAll(tab1, tab2, tab3, tab4);
    borderPane.setCenter(tabPane);
    getChildren().add(borderPane);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:19,代码来源:TabSample.java

示例2: create_center

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
/** Erstellt ein Tabpane, das in drei Tabs ein leeres Test-, Code-, und Konsolenpane enthaelt
 * Die Tabs koennen nicht geschlossen werden.
 * @return gibt das ertellte Tabpane zurueck
 */
private TabPane create_center(){
	TabPane menue = new TabPane();
	menue.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	code_pane = new CodePane();
	test_pane = new TestPane();
	console_pane = new ConsolePane();
	Tab code_tab = new Tab("Code");
	Tab test_tab = new Tab("Tests");
	Tab console_tab = new Tab("Konsole");
	code_tab.setContent(code_pane);
	test_tab.setContent(test_pane);
	console_tab.setContent(console_pane);
	code_tab.setContent(code_pane);
	test_tab.setContent(test_pane);
	console_tab.setContent(console_pane);
	menue.getTabs().addAll(code_tab, test_tab, console_tab);
	return menue;
}
 
开发者ID:ProPra16,项目名称:programmierpraktikum-abschlussprojekt-team-1,代码行数:23,代码来源:Gui.java

示例3: start

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
@Override
public void start(final Stage primaryStage) throws Exception {
	primaryStage.setMinHeight(400);
	primaryStage.setMinWidth(600);
	final BorderPane mainPane = new BorderPane();

	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);

	controls = new GridPane();

	mainPane.setLeft(controls);
	mainPane.setCenter(tabPane);

	initializeControls(primaryStage);

	final Scene scene = new Scene(mainPane);
	primaryStage.setTitle(getTitle());
	primaryStage.setScene(scene);
	primaryStage.show();
}
 
开发者ID:FTSRG,项目名称:theta,代码行数:22,代码来源:BaseGui.java

示例4: NodeControlPane

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public NodeControlPane(Core core) {
    super();
    
    this.core = core;
    
   
    TabPane tab = new TabPane();      
    tab.getTabs().add(newIndexTab());                
    tab.getTabs().add(newWikiTab());
    tab.getTabs().add(newSpacetimeTab());
    tab.getTabs().add(newSpaceTab());
    tab.getTabs().add(newTimeTab());
    tab.getTabs().add(newOptionsTab());
    
    tab.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
    tab.autosize();
    
    setCenter(tab);
    
    FlowPane menu = new FlowPane();
    menu.getChildren().add(newAddButton());
    menu.getChildren().add(newBrowserButton());
    
    setBottom(menu);
}
 
开发者ID:automenta,项目名称:netentionj-desktop,代码行数:26,代码来源:NodeControlPane.java

示例5: GlobalUI

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public GlobalUI(){
        globalGridPane = new GridPane();
//        dataCollectionUI = new DataCollectionUI();
        dataManipulationUI = new DataManipulationUI();
        eventDetectionUI = new EventDetectionUI();
        influenceAnalysisUI = new InfluenceAnalysisUI();
        logUI = new LogUI();
        menuBar();
        tabPane = new TabPane();
        tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
//        Tab dataCollectionTab = new Tab("Data Collection");
//        dataCollectionTab.setContent(dataCollectionUI.grid);
        Tab dataManipulationTab = new Tab("Data Manipulation");
        dataManipulationTab.setContent(dataManipulationUI.grid);
        Tab eventTab = new Tab("Event Detection");
        eventTab.setContent(eventDetectionUI.grid);
        Tab influenceTab = new Tab("Influence Analysis");
        influenceTab.setContent(influenceAnalysisUI.grid);
        tabPane.getTabs().addAll(dataManipulationTab,eventTab,influenceTab);
        tabPane.getSelectionModel().select(0);
        globalGridPane.add(globalMenu,0,0);
        globalGridPane.add(tabPane,0,1);
        globalGridPane.add(logUI.logGrid,0,2);
        LogUI.addLogEntry("Application started - available cores: "+Configuration.numberOfCores+", workspace: "+Configuration.workspace);
    }
 
开发者ID:AdrienGuille,项目名称:SONDY,代码行数:26,代码来源:GlobalUI.java

示例6: 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

示例7: FilesView

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
/**
 * Initializes the whole view.
 */
public FilesView() {

	chatLogTextArea = new TextArea();
	chatLogTextArea.setEditable(false);

	clearLogsButton = new Button(Client.lang.getString("clear"));
	loadLogsButton = new Button(Client.lang.getString("reload"));

	final ButtonBar buttonBar = new ButtonBar();
	buttonBar.getButtons().addAll(loadLogsButton, clearLogsButton);

	final VBox chatLogsTabContent = new VBox(5.0, chatLogTextArea, buttonBar);
	VBox.setVgrow(chatLogTextArea, Priority.ALWAYS);

	chatLogsTab = new Tab(Client.lang.getString("chatlogs"), chatLogsTabContent);

	rootPane = new TabPane(chatLogsTab);
	rootPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
}
 
开发者ID:Bios-Marcel,项目名称:ServerBrowser,代码行数:23,代码来源:FilesView.java

示例8: onActionCreateRigthMenu

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
private TabPane onActionCreateRigthMenu() {
    DebugConsole.getDefault().debug(this.getClass(), "On action create RigthMenu"); // NOI18N
    
    final TabPane tp = new TabPane();
    tp.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
    
    final Tab tDebugOptions = new Tab();
    tDebugOptions.setClosable(Boolean.FALSE);
    tDebugOptions.setContent(DebugConsole.getDefault().getDebugOptions());
    tDebugOptions.setText("Debug Options"); // NOI18N
    tp.getTabs().add(tDebugOptions);
    
    return tp;
}
 
开发者ID:Naoghuman,项目名称:Incubator,代码行数:15,代码来源:GameAreaPresenter.java

示例9: initComponents

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
@Override
public void initComponents() {
    root = new StackPane();

    tabs = new TabPane();
    tabs.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);

    generalTab = (GeneralTab) new GeneralTab().register();
    episodesTab = (EpisodesTab) new EpisodesTab(this).register();

    generalTab.setOnSelectionChanged(event -> {
        this.setHeight(generalTab.HEIGHT);
        this.setWidth(generalTab.WIDTH);
    });

    episodesTab.setOnSelectionChanged(event -> {
        this.setHeight(episodesTab.HEIGHT);
        this.setWidth(episodesTab.WIDTH);
    });

    apply = new LButton().setImage("tick_blue").setTooltipKey("info.apply").register();
    createFromFile = new LButton().setImage("open").setTooltipKey("info.root").register();
    cancel = new LButton().setImage("exit").setTooltipKey("info.cancel").register();

    apply.setOnAction(event -> apply());
    cancel.setOnAction(event -> this.destroy());
    createFromFile.setOnAction(event -> {
        clearData();
        File dir = directoryChooser.showDialog(this);
        if (dir != null) {
            try {
                this.generalTab.populateFromDirectory(dir);
                this.episodesTab.populateFromDirectory(dir);
            } catch (IOException ex) {
                log.error("Failed to walk file tree: " + dir.getAbsolutePath(), ex);
                new LAlert(Alert.AlertType.ERROR).setKey("file_walking").register().showAndWait();
            }
        }
    });
}
 
开发者ID:Luke-Melaia,项目名称:Series-Freak,代码行数:41,代码来源:UpdateWindow.java

示例10: DCPlots

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public DCPlots(DCThreadManager dc) {
        this.dc = dc;
        // tab pane
        final TabPane tabPane = new TabPane();
        tabPane.setSide(Side.TOP);
        tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);

        // charts
        for (JFreeChart lc : this.dc.getPlotter().getAllCharts()) {
            final Tab lcTab = new Tab();
            final StackPane lcSpane = new StackPane();
            lcTab.setText( lc.getTitle().getText() );
            lcTab.setContent(lcSpane);
            // Using java2d in javafx
            // Bind canvas size to stack pane size. 
//            ChartCanvas canvas = new ChartCanvas(lc);
            final SwingNode chartSwingNode = new SwingNode();
            chartSwingNode.setContent(  new ChartPanel(lc) );
            lcSpane.getChildren().add(chartSwingNode);
//            canvas.widthProperty().bind(lcSpane.widthProperty());
//            canvas.heightProperty().bind(lcSpane.heightProperty());
            tabPane.getTabs().add(lcTab);
        }

        final Stage stage = new Stage();
        stage.setTitle("Results");
        //create scene with set width, height and color
        Scene scene = new Scene(tabPane, 1000, 600, Color.WHITESMOKE);
        //set scene to stage
        stage.setScene(scene);
        //center stage on screen
        stage.centerOnScreen();
        //show the stage
        stage.show();
    }
 
开发者ID:fgr1986,项目名称:maf,代码行数:36,代码来源:DCPlots.java

示例11: createAnalysisPanel

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
private Control createAnalysisPanel() {
		TabPane tabbedPanel = new TabPane();
		tabbedPanel.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
		projectBrowser = new ProjectBrowser(this);

		tabbedPanel.getTabs().add(new Tab("Project", projectBrowser.getPane()));
		PathImageDetailsPanel pathImageDetailsPanel = new PathImageDetailsPanel(this);
		tabbedPanel.getTabs().add(new Tab("Image", pathImageDetailsPanel.getContainer()));

		final PathAnnotationPanel panelAnnotations = new PathAnnotationPanel(this);
		SplitPane splitAnnotations = new SplitPane();
		splitAnnotations.setOrientation(Orientation.VERTICAL);
		splitAnnotations.getItems().addAll(
				panelAnnotations.getPane(),
				new SelectedMeasurementTableView(this).getTable());
		tabbedPanel.getTabs().add(new Tab("Annotations", splitAnnotations));

		final PathObjectHierarchyView paneHierarchy = new PathObjectHierarchyView(this);
		SplitPane splitHierarchy = new SplitPane();
		splitHierarchy.setOrientation(Orientation.VERTICAL);
		splitHierarchy.getItems().addAll(
				paneHierarchy.getPane(),
				new SelectedMeasurementTableView(this).getTable());
		tabbedPanel.getTabs().add(new Tab("Hierarchy", splitHierarchy));
		
		// Bind the split pane dividers to create a more consistent appearance
		splitAnnotations.getDividers().get(0).positionProperty().bindBidirectional(
				splitHierarchy.getDividers().get(0).positionProperty()
				);

		WorkflowPanel workflowPanel = new WorkflowPanel(this);
		tabbedPanel.getTabs().add(new Tab("Workflow", workflowPanel.getPane()));
		
//		PathObjectHierarchyPanel pathObjectHierarchyPanel = new PathObjectHierarchyPanel(this);
//		tabbedPanel.getTabs().add(new Tab("Hierarchy", pathObjectHierarchyPanel.getPane()));
		
		return tabbedPanel;
	}
 
开发者ID:qupath,项目名称:qupath,代码行数:39,代码来源:QuPathGUI.java

示例12: initComponents

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
private void initComponents() {
	// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
	tabPane = new TabPane();
	generalTab = new Tab();
	generalOptionsPane = new GeneralOptionsPane();
	editorTab = new Tab();
	editorOptionsPane = new EditorOptionsPane();
	markdownTab = new Tab();
	markdownOptionsPane = new MarkdownOptionsPane();

	//======== tabPane ========
	{
		tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);

		//======== generalTab ========
		{
			generalTab.setText(Messages.get("OptionsDialog.generalTab.text"));
			generalTab.setContent(generalOptionsPane);
		}

		//======== editorTab ========
		{
			editorTab.setText(Messages.get("OptionsDialog.editorTab.text"));
			editorTab.setContent(editorOptionsPane);
		}

		//======== markdownTab ========
		{
			markdownTab.setText(Messages.get("OptionsDialog.markdownTab.text"));
			markdownTab.setContent(markdownOptionsPane);
		}

		tabPane.getTabs().addAll(generalTab, editorTab, markdownTab);
	}
	// JFormDesigner - End of component initialization  //GEN-END:initComponents
}
 
开发者ID:JFormDesigner,项目名称:markdown-writer-fx,代码行数:37,代码来源:OptionsDialog.java

示例13: 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

示例14: AquaTabPaneSkin

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
public AquaTabPaneSkin(TabPane tabPane) {
    super(tabPane);

    definePillPosition();
    adjustBorders();

    /**
     * Tabs are not closeable in Aqua
     */
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    
    addInactiveState();
}
 
开发者ID:cis422s14team5,项目名称:WatchlistPro,代码行数:14,代码来源:AquaTabPaneSkin.java

示例15: constructContainer

import javafx.scene.control.TabPane; //导入方法依赖的package包/类
@Override
public Parent constructContainer()
{
	
	bp.setId("loginviewbg");
	
	list = new ListView<String>();
	items = FXCollections.observableArrayList("Philippe Kr�ttli","Irina Deck","Javier Martinez Alvarez","Frithjof Hoppe");
	list.setItems(items);		
	
	AllFields = new VBox(50);
	AllFields.setAlignment(Pos.CENTER);
	AllFields.setMaxWidth(300);
	AllFields.setPadding(new Insets(20));
	
	tabPane = new TabPane();
	tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
	 
    Tab tabDerive = new Tab();
    tabDerive.setText("Derive");
    HBox hbox = new HBox();
    hbox.setPadding(new Insets(20, 0, 0, 0));
    hbox.setStyle("-fx-font: 24 'System Regular'");
    hbox.getChildren().add(new Label(tabDerive.getText()));
    hbox.setAlignment(Pos.CENTER);
    tabDerive.setContent(hbox);
         
    Tab tabTeamwork = new Tab();
    tabTeamwork.setText("Teamwork");
    HBox hbox2 = new HBox();
    hbox2.setPadding(new Insets(20, 0, 0, 0));
    hbox2.setStyle("-fx-font: 24 'System Regular'");
    hbox2.getChildren().add(new Label(tabTeamwork.getText()));
    hbox2.setAlignment(Pos.CENTER);
    tabTeamwork.setContent(hbox2);
         
    tabPane.getTabs().addAll(tabDerive, tabTeamwork);
    tabPane.getSelectionModel().getSelectedItem().setStyle("-fx-background-color:#a3a4a8");
    
    tabPane.setOnMouseClicked(e -> {
		for(Tab actTab:tabPane.getTabs())
		{
			actTab.setStyle("-fx-background-color:#f0f0f0");
		}
		tabPane.getSelectionModel().getSelectedItem().setStyle("-fx-background-color:#a3a4a8");
		
		if(tabPane.getSelectionModel().getSelectedIndex()== 0)
		{
			btnContinue.setOnAction(ev -> getFXController().showView("deriveserverdoorview"));
		} else
		{
			btnContinue.setOnAction(ev -> getFXController().showView("teamworkserverdoorview"));
		}
	});
	
	SearchDMO = new HBox();
	Bottom = new HBox();
	
	txtDMO = new TextField();
	txtDMO.setMinHeight(50);
	txtDMO.setMinWidth(700);
	txtDMO.setPromptText("Email-Adresse des Benutzers");
	
	btnSearch = new AppButton("Suchen");
	btnContinue = new AppButton("Weiter zum DMO");
	back = new BackButton(getFXController(),"Zur�ck");
		
	SearchDMO.getChildren().addAll(txtDMO,btnSearch);
	Bottom.getChildren().addAll(back, btnContinue);
	AllFields.getChildren().addAll(SearchDMO,list,Bottom);
	
	bp.setTop(tabPane);
	bp.setCenter(AllFields);
	bp.setBottom(Bottom);
		
	
	return bp;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:79,代码来源:SaveDownloadstackForeignDMOView.java


注:本文中的javafx.scene.control.TabPane.setTabClosingPolicy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。