當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。