Java 类javafx.scene.control.TabPane.TabClosingPolicy 实例源码

项目:marathonv5    文件:CompositeLayout.java   
private void initComponents() {
    optionBox.setItems(model);
    optionBox.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
        if (newValue != null) {
            updateTabPane();
        }
    });
    optionBox.setCellFactory(new Callback<ListView<PlugInModelInfo>, ListCell<PlugInModelInfo>>() {
        @Override public ListCell<PlugInModelInfo> call(ListView<PlugInModelInfo> param) {
            return new LauncherCell();
        }
    });
    optionTabpane.setId("CompositeTabPane");
    optionTabpane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    optionTabpane.getStyleClass().add(TabPane.STYLE_CLASS_FLOATING);
    VBox.setVgrow(optionTabpane, Priority.ALWAYS);
}
项目:ServerBrowser    文件:FilesView.java   
/**
 * 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);
}
项目:programmierpraktikum-abschlussprojekt-team-1    文件:Gui.java   
/** 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;
}
项目:theta    文件:BaseGui.java   
@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();
}
项目:livestreamer_twitch_gui    文件:BrowserController.java   
private void setupTabPane() {
    this.browserRootBorderPane.setCenter(this.browserTabPane);
    this.browserTabPane.setTabClosingPolicy(TabClosingPolicy.ALL_TABS);
    this.browserTabPane.getTabs().addListener((ListChangeListener<Tab>) change -> {
        if (change.next() && change.wasAdded()) {
            LOGGER.debug("Tab was added");
            this.browserTabPane.getSelectionModel().select(change.getAddedSubList().get(0));
        }
    });
    this.browserTabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
        final BrowserTab oldTab = (BrowserTab) oldValue;
        if (oldTab != null) {
            this.searchTextField.setText("");
            oldTab.resetActiveItems();
        }
    });
}
项目:marathonv5    文件:MPFConfigurationStage.java   
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;
}
项目:Pinggers-GIT-SVN-Client    文件:Overview.java   
/**
 * 
 */
private void setupMain()
{
    tabs = new TabPane();
    root.setCenter(tabs);
    tabs.setTabClosingPolicy(TabClosingPolicy.ALL_TABS);
    setupProjectsOverview();
}
项目:BrickifyFX    文件:ImageCanvasController.java   
@Override
public void initialize(URL url, ResourceBundle rb) {
    super.initialize(url, rb);

    tabCount = 1;
    imageTabPane.setTabClosingPolicy(TabClosingPolicy.SELECTED_TAB);
    ChangeListener<Number> originalImageSizeChangeListener = new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
            updateOriginalCanvas();
            if (originalImageCropRectangle != null) {
                canvasCropOriginX = originalImageCropRectangle.getMinX() * scaleFactor;
                canvasCropOriginY = originalImageCropRectangle.getMinY() * scaleFactor;
                canvasCropToX = canvasCropOriginX + originalImageCropRectangle.getWidth() * scaleFactor;
                canvasCropToY = canvasCropOriginY + originalImageCropRectangle.getHeight() * scaleFactor;
                Rectangle2D canvasCropRectangle = new Rectangle2D(
                        Math.floor(canvasCropOriginX + 0.5),
                        Math.floor(canvasCropOriginY + 0.5),
                        Math.floor(canvasCropToX - canvasCropOriginX + 0.5),
                        Math.floor(canvasCropToY - canvasCropOriginY + 0.5)
                        );
                drawCropRectangle(canvasCropRectangle);
            }
        }
    };
    originalImagePane.heightProperty().addListener(originalImageSizeChangeListener);
    originalImagePane.widthProperty().addListener(originalImageSizeChangeListener);

}
项目:qupath    文件:QuPathGUI.java   
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;
    }
项目:JVx.javafx    文件:JavaFXTabsetPanel.java   
/**
 * Creates a new instance of {@link JavaFXTabsetPanel} with a pre-defined
 * {@link TabPane}.
 * 
 * @param pTabPane the {@link TabPane}
 */
protected JavaFXTabsetPanel(TabPane pTabPane)
{
    // The DndTabPane requires that it is wrapped in a Pane,
    // that is needed for the animation/drag-marker to work.
    // Wrapping a "normal" TabPane in a StackPane does nothing, neither
    // good nor bad, so we simply wrap all out of simplicity reasons.
    super(new StackPane());

    tabPane = pTabPane;

    if (tabPane instanceof DndTabPane)
    {
        ((DndTabPane)tabPane).setOnTabDragged(this::onTabDragged);

        FXTabPaneSkinRT40150 skin = new FXTabPaneSkinRT40150(tabPane);
        DndTabPaneFactory.setup(FeedbackType.MARKER, resource, skin);
        tabPane.setSkin(skin);
    }

    resource.getChildren().add(tabPane);

    tabPlacement = PLACEMENT_TOP;

    tabPane.getSelectionModel().selectedIndexProperty().addListener(this::onSelectionChanged);

    tabPane.setTabClosingPolicy(TabClosingPolicy.ALL_TABS);
}
项目:JVx.javafx    文件:FXTabWindowManager.java   
/**
 * Creates a new instance of {@link FXTabWindowManager}.
 */
public FXTabWindowManager()
{
    windowModalChangedHandler = this::onWindowModalChanged;

    tabPane = new DndTabPane();
    containerPane = new StackPane(tabPane);
    FXTabPaneSkinRT40150 skin = new FXTabPaneSkinRT40150(tabPane);
    DndTabPaneFactory.setup(FeedbackType.MARKER, containerPane, skin);
    tabPane.setSkin(skin);

    tabPane.setTabClosingPolicy(TabClosingPolicy.ALL_TABS);

    windowsToTabs = new HashMap<>();
}
项目:Jootil    文件:BaseSettingsStage.java   
/**
 * Creates a new base settings stage.
 * @param stage the owner
 */
public BaseSettingsStage(Stage stage)
{
    //setup stage
    this.initOwner(stage);
    this.initModality(Modality.APPLICATION_MODAL);
    this.setTitle("Settings");
    this.setResizable(false);
    this.setMinWidth(350);
    this.getIcons().add(new Image("/images/icons/console.png"));

    //root pane
    BorderPane borderPane = new BorderPane();

    //header box
    HeaderBox headerBox = new HeaderBox("Settings", "Configure application-specific settings.");
    borderPane.setTop(headerBox);

    //tab pane
    this.tabPane = new TabPane();
    this.tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    borderPane.setCenter(this.tabPane);

    //buttons box
    ButtonsBox buttonsBox = new ButtonsBox(true, true);
    buttonsBox.setOnOk(event -> this.confirm(true));
    buttonsBox.setOnCancel(event -> this.confirm(false));
    borderPane.setBottom(buttonsBox);

    //show
    this.setScene(new Scene(borderPane));
    this.sizeToScene();
}
项目:WatchlistPro    文件:AquaTabPaneSkin.java   
public AquaTabPaneSkin(TabPane tabPane) {
    super(tabPane);

    definePillPosition();
    adjustBorders();

    /**
     * Tabs are not closeable in Aqua
     */
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);

    addInactiveState();
}
项目:Lernkartei_2017    文件:SaveDownloadstackForeignDMOView.java   
@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;
}
项目:Lernkartei_2017    文件:DMOStackView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(740);
    btnCreate.setMinWidth(740);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("dmodoorview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:SaveDownloadstackOwnDMODoorSelectionView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("saveuploadstackonserverdialogview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane); 

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:SaveDownloaddoorOwnDMOView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("savedownloaddooronserverdialogview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:DMODoorView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(740);
    btnCreate.setMinWidth(740);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("lernenselectionview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:SaveDownloadstackLocalView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("doorsavepathselectionview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:TeamworkServerDoorView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("lernenselectionview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Lernkartei_2017    文件:SaveDownloadstackOwnDMOView.java   
@Override
public Parent constructContainer()
{
    bp = new BorderPane();
    bp.setId("userviewbg");

    back = new BackButton(getFXController(),"Zur�ck");

    tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    tabPane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Tab>() {
           @Override
           public void changed(ObservableValue<? extends Tab> ov, Tab tabOld, Tab tabNew) {
              refreshView();
           }
        });


    Center = new VBox();
    Search = new HBox();
    Top = new VBox();


    txtSearch = new TextField();
    txtSearch.setPromptText("Suche nach Doors");
    txtSearch.setMinWidth(740);
    txtSearch.setMinHeight(50);;
    btnSearch = new AppButton("Suchen");
    btnCreate = new AppButton("++Erstellen++");
    btnCreate.setMinWidth(590);
    btnCreate.setOnAction(e -> getFXController().showView("createdoorview"));

    StackShowList.setSpacing(20);
    Center.setSpacing(20);


    sMain = new ScrollPane();
    sMain.setContent(Center);

    Search.getChildren().addAll(txtSearch,btnSearch);
    Center.getChildren().addAll(StackShowList,btnCreate);

    back = new AppButton("Zur�ck");
    back.setOnAction(e-> getFXController().showView("savedownloadstackowndmodoorselectionview"));


    Bottom = new VBox();

    Bottom.getChildren().addAll(back);
    Top.getChildren().addAll(Search,tabPane);

    bp.setTop(Top);
    bp.setCenter(sMain);
    bp.setBottom(Bottom);

    getFXController().getModel("serverstack").registerView(this);

    return bp;
}
项目:Evolution-Speciation    文件:MainWindowLayout.java   
public TabPane getCenterLayout() {
    TabPane layout = new TabPane();

    Tab environmentTab = new Tab("Environments");
    GridPane environmentsGridPane = getEnvironmentsGridPane();
    environmentTab.setContent(environmentsGridPane);

    Tab dnaTab = new Tab("DNA");
    GridPane dnaGridPane = getDnaGridPane();
    Button dnaApplyButto = new Button("Apply");
    PropertiesSetter propertiesSetter = new PropertiesSetter();
    GridPane.setConstraints(dnaApplyButto, 0, 20);
    dnaGridPane.getChildren().addAll(dnaApplyButto);
    dnaApplyButto.setOnAction(e -> {
        propertiesSetter.setDnaProperties(dnaGridPane.getChildren());
    });
    dnaTab.setContent(dnaGridPane);
    propertiesSetter.setDnaProperties(dnaGridPane.getChildren());

    Tab creatureTab = new Tab("Creatures");
    GridPane creatureGridPane = getCreatureGridPane();
    Button creatureApplyButton = new Button("Apply");
    GridPane.setConstraints(creatureApplyButton, 0, 20);
    creatureGridPane.getChildren().addAll(creatureApplyButton);
    creatureApplyButton.setOnAction(e -> {
        try{
        TableView<TableCreature> table = (TableView<TableCreature>)(creatureGridPane.getChildren().get(creatureGridPane.getChildren().size()-1));
        properties.setProtoCreatures(table);}
        catch(ClassCastException exception){

        }
    });
    creatureTab.setContent(creatureGridPane);


    Tab propertiesTab = new Tab("Properties");
    GridPane propertiesGridPane = getPropertiesPane();
    Button propertiesApplyButton = new Button("Apply");
    GridPane.setConstraints(propertiesApplyButton, 0, 20);
    propertiesGridPane.getChildren().addAll(propertiesApplyButton);
    propertiesApplyButton.setOnAction(e -> {
        propertiesSetter.setPropertyProperty(propertiesGridPane);
    });
    propertiesTab.setContent(propertiesGridPane);
    propertiesSetter.setPropertyProperty(propertiesGridPane);

    layout.getTabs().addAll(dnaTab, creatureTab, environmentTab, propertiesTab);
    layout.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    return layout;
}
项目:Gargoyle    文件:DockTabPaneSkin.java   
private boolean showCloseButton() {
    return tab.isClosable() && (getSkinnable().getTabClosingPolicy().equals(TabClosingPolicy.ALL_TABS)
            || getSkinnable().getTabClosingPolicy().equals(TabClosingPolicy.SELECTED_TAB) && tab.isSelected());
}
项目:Jfx-Browser    文件:MainController.java   
@Override
public void initialize(URL url, ResourceBundle rb) {


    //addNewTab.setGraphic(new ImageView(new Image(getClass().getResourceAsStream(Main.IMAGES+"newtab.png"))));

    // ------All opens tabs should be closed so below line is for just
    // closing tabs
    addNewTab.setClosable(false);
    addNewTab.setId("addNewTab");
    tabPane.setId("tabadded");


    tabPane.setTabClosingPolicy(TabClosingPolicy.ALL_TABS);
    // ------tabPane.setFocusTraversable(false);

    try {
        // -----here below adding page title of tab
        firstTab.setContent(FXMLLoader.load(getClass().getResource(Main.FXMLS+"Tab.fxml")));

        // firstTab.setText("Google");

    } catch (IOException e2) {
        // TODO Auto-generated catch block
        e2.printStackTrace();
    }

    tabPane.getTabs().addAll(firstTab, addNewTab);
    rootBorderPane.setCenter(tabPane);

    getTabPaneView(tabPane, addNewTab);
    tabPaneChangeListener(tabPane);

}
项目:L42    文件:ReplGui.java   
@Override
public void start(Stage primaryStage) throws Exception {

  BorderPane borderPane = new BorderPane();

  //set the 'loaded', 'output' and 'errors' tabs to be read-only (cannot be edited)
  loadedSrc.setEditable(false);
  output.setEditable(false);
  errors.setEditable(false);

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

  tabbedPane.getTabs().addAll(new Tab("new code", newSrc));
  tabbedPane.getTabs().addAll(new Tab("loaded", loadedSrc));
  tabbedPane.getTabs().addAll(new Tab("output", output));
  tabbedPane.getTabs().addAll(new Tab("errors", errors));

  //System.out.println(System.out.getClass().getName());
  //System.out.println(System.err.getClass().getName());
  System.setOut(delegatePrintStream(err,System.out));
  System.setErr(delegatePrintStream(err,System.err));

  Button rollbackBtn = new Button("Rollback!");
  rollbackBtn.setTooltip(new Tooltip("Rollback to previous code!"));
  rollbackBtn.setOnAction(e->rollBackCode());

  tabbedPane.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
    @Override
    public void changed(ObservableValue<? extends Number> ov, Number oldValue, Number newValue) {
      rollbackBtn.setVisible(newValue.intValue()==0);
    }
  });

  AnchorPane anchor = new AnchorPane(tabbedPane, rollbackBtn);

  AnchorPane.setTopAnchor(rollbackBtn, 3.0);
  AnchorPane.setRightAnchor(rollbackBtn, 5.0);
  AnchorPane.setTopAnchor(tabbedPane, 0.0);
  AnchorPane.setRightAnchor(tabbedPane, 0.0);
  AnchorPane.setLeftAnchor(tabbedPane, 0.0);
  AnchorPane.setBottomAnchor(tabbedPane, 0.0);
  borderPane.setCenter(anchor);

  runB = new Button("Run!");
  runB.setOnAction(e->runCode());
  runB.setMaxWidth(Double.MAX_VALUE);
  borderPane.setBottom(runB);

  Scene scene = new Scene(borderPane, SCENE_WIDTH, SCENE_HEIGHT); // Manage scene size
  primaryStage.setTitle("L42 IDE");
  primaryStage.setScene(scene);
  primaryStage.setMinWidth(scene.getWidth());
  primaryStage.setMinHeight(scene.getHeight());
  primaryStage.show();
}
项目:robovm-samples    文件:ContractRFXApp.java   
@Override
public void start(Stage primaryStage) throws Exception {

    BorderPane rootPane = new BorderPane();
    rootPane.setId("root");

    TabPane rootTabPane = new TabPane();
    rootTabPane.setSide(Side.BOTTOM);
    rootTabPane.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
    rootPane.setCenter(rootTabPane);

    Controller[] controllers = new Controller[4];

    rootTabPane.getSelectionModel().selectedIndexProperty().addListener((o, oldVal, newVal) -> {
        if (oldVal.intValue() >= 0 && controllers[oldVal.intValue()] != null) {
            controllers[oldVal.intValue()].afterHide();
        }
        if (controllers[newVal.intValue()] != null) {
            controllers[newVal.intValue()].beforeShow();
        }
    });

    FXMLLoader loader = null;

    loader = new FXMLLoader();
    loader.setLocation(ContractRFXApp.class.getResource("SelectTask.fxml"));
    loader.load();
    SelectTaskController selectTaskController = loader.getController();
    selectTaskController.init(clientModel, taskModel);

    loader = new FXMLLoader();
    loader.setLocation(ContractRFXApp.class.getResource("Work.fxml"));
    Parent workPane = (Parent) loader.load();
    WorkController workController = loader.getController();
    workController.init(taskModel, selectTaskController);
    controllers[0] = workController;

    loader = new FXMLLoader();
    loader.setLocation(ContractRFXApp.class.getResource("Clients.fxml"));
    Parent clientsPane = (Parent) loader.load();
    ClientsController clientsController = loader.getController();
    clientsController.init(clientModel);
    controllers[2] = clientsController;

    loader = new FXMLLoader();
    loader.setLocation(ContractRFXApp.class.getResource("Tasks.fxml"));
    Parent tasksPane = (Parent) loader.load();
    TasksController tasksController = loader.getController();
    tasksController.init(clientModel, taskModel);
    controllers[3] = tasksController;

    Font iconFont = Font.loadFont(ContractRFXApp.class.getResource("ionicons.ttf").toExternalForm(), 10);

    Tab workTab = createIconTab(iconFont, '\uf1e1', "Work");
    rootTabPane.getTabs().add(workTab);
    workTab.setContent(workPane);

    Tab reportsTab = createIconTab(iconFont, '\uf2b5', "Reports");
    rootTabPane.getTabs().add(reportsTab);

    Tab clientsTab = createIconTab(iconFont, '\uf1bf', "Clients");
    rootTabPane.getTabs().add(clientsTab);
    clientsTab.setContent(clientsPane);

    Tab tasksTab = createIconTab(iconFont, '\uf16c', "Tasks");
    rootTabPane.getTabs().add(tasksTab);
    tasksTab.setContent(tasksPane);

    Scene scene = new Scene(rootPane);
    rootTabPane.tabMinWidthProperty().bind(scene.widthProperty().divide(4.0).subtract(5));
    rootTabPane.tabMaxWidthProperty().bind(rootTabPane.tabMinWidthProperty());
    primaryStage.setTitle("ContractR");
    primaryStage.setScene(scene);

    primaryStage.show();
}
项目:WatchlistPro    文件:TabPaneSkinHack.java   
private boolean showCloseButton() {
    return tab.isClosable() &&
            (getSkinnable().getTabClosingPolicy().equals(TabClosingPolicy.ALL_TABS) ||
            getSkinnable().getTabClosingPolicy().equals(TabClosingPolicy.SELECTED_TAB) && tab.isSelected());
}