List of usage examples for javafx.scene.layout BorderPane setBottom
public final void setBottom(Node value)
From source file:RemoveDuplicateFiles.java
public static Scene makeScene() { //Setup the main BorderPane (Holds all the things) BorderPane backPane = new BorderPane(); //---------------------------------------------------------------------- //Setup the Main Menu Buttons & Pane sortFilesButton = new Button("Sort Files"); batchRenameButton = new Button("Batch Rename Files"); HBox mainButtons = new HBox(); mainButtons.setPadding(new Insets(15, 12, 15, 12)); mainButtons.setSpacing(10);//w w w.j a v a2s .c o m mainButtons.setStyle(BUTTON_STYLE); mainButtons.getChildren().add(sortFilesButton); mainButtons.getChildren().add(batchRenameButton); backPane.setTop(mainButtons); //---------------------------------------------------------------------- //Setup the filetypes box HBox fileTypePane = GUIFactories.getFileTypeBox(fileTypes); backPane.setBottom(fileTypePane); //---------------------------------------------------------------------- //Setup the FileType Pre-set Buttons VBox preSets = GUIFactories.getPresets(fileTypes); backPane.setRight(preSets); //---------------------------------------------------------------------- //Setup the center GridPane rmvButton = new Button("Remove Duplicates"); actionTarget = new Text(); GridPane grid = GUIFactories.getCenterPane(address, rmvButton, actionTarget); backPane.setCenter(grid); //---------------------------------------------------------------------- Scene scene = new Scene(backPane, WIDTH, HEIGHT); return scene; }
From source file:org.pdfsam.ui.info.InfoStage.java
@Inject public InfoStage(InfoPane infoPane, Collection<Image> logos, StylesConfig styles) { BorderPane containerPane = new BorderPane(); containerPane.getStyleClass().addAll(Style.CONTAINER.css()); containerPane.setCenter(infoPane);// www. j ava 2s . c om containerPane.setBottom(new ClosePane()); Scene scene = new Scene(containerPane); scene.getStylesheets().addAll(styles.styles()); scene.setOnKeyReleased(new HideOnEscapeHandler(this)); setScene(scene); setTitle(DefaultI18nContext.getInstance().i18n("Document details")); getIcons().addAll(logos); setMaximized(true); }
From source file:com.thomaskuenneth.tkmactuning.TKMacTuning.java
@Override public void start(Stage primaryStage) { TabPane tabPane = new TabPane(); tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE); // Found here: http://stackoverflow.com/a/17488304/5956451 tabPane.getStyleClass().add("floating"); // TODO: propper error handling JSONTokener t = new JSONTokener(getClass().getResourceAsStream("resources/plugins.json")); JSONArray a = new JSONArray(t); a.forEach((Object anObject) -> { JSONObject jsonObject = (JSONObject) anObject; addPlugin(tabPane, jsonObject.getString("class"), jsonObject.getString("pluginName")); });/* w w w. java 2s . c o m*/ FlowPane buttonsPane = new FlowPane(Orientation.HORIZONTAL); buttonsPane.setPadding(LayoutConstants.PADDING_1); buttonsPane.setHgap(LayoutConstants.HORIZONTAL_CONTROL_GAP); buttonsPane.setAlignment(Pos.BASELINE_LEFT); final Button buttonReread = new Button(getString("reread")); buttonReread.setOnAction(event -> { PluginManager.reread(this); }); buttonsPane.getChildren().add(buttonReread); final Button buttonApply = new Button(getString("apply")); buttonApply.setOnAction(event -> { PluginManager.save(this); }); buttonsPane.getChildren().add(buttonApply); statusbar = new StatusBar(); BorderPane borderPane = new BorderPane(tabPane); borderPane.setTop(buttonsPane); borderPane.setBottom(statusbar); primaryStage.setScene(new Scene(borderPane, 800, 600)); primaryStage.setTitle(getString("application_name")); ready(); primaryStage.show(); }
From source file:investor.views.CompaniesView.java
protected void OnSDPointer(boolean action) { sdChartShowed = action;//from w ww . j a v a 2s . c o m //true for showing sd chart if (action) { if (lastData == null) { System.out.println("Original data is null, downloading it"); OnDataRangeChanged(); return; } Index[] dataPointer = new Index[lastData.length]; for (int i = 0; i < lastData.length; i++) { dataPointer[i] = new Index(lastData[i]); } lineChartSD = LinearChartManager.linear(); lineChartSD.setTitle("SD"); lineChartSD.setMaxHeight(250); int size = lastData.length; double[] data1 = Indicators.SD(dataPointer, size); for (int i = 0; i < size; i++) { dataPointer[i].setClose_val(data1[i]); } LinearChartManager.addSeries(lineChartSD, dataPointer, "SD", selectedRange); BorderPane bPane = (BorderPane) pane.getChildren().get(1); bPane.setBottom(lineChartSD); } else { //let's hide it lineChartSD = null; BorderPane bPane = (BorderPane) pane.getChildren().get(1); bPane.setBottom(null); } }
From source file:Main.java
@Override public void start(Stage primaryStage) { BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); Button btnTop = new Button("Top"); bp.setTop(btnTop);//from www . j av a 2 s . c o m Button btnLeft = new Button("Left"); bp.setLeft(btnLeft); Button btnCenter = new Button("Center"); bp.setCenter(btnCenter); Button btnRight = new Button("Right"); bp.setRight(btnRight); Button btnBottom = new Button("Bottom"); bp.setBottom(btnBottom); Scene scene = new Scene(bp, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("BorderPane Test"); BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); Button btnTop = new Button("Top"); bp.setTop(btnTop);/*from www .ja v a 2s. co m*/ Button btnLeft = new Button("Left"); bp.setLeft(btnLeft); Button btnCenter = new Button("Center"); bp.setCenter(btnCenter); Button btnRight = new Button("Right"); bp.setRight(btnRight); Button btnBottom = new Button("Bottom"); bp.setBottom(btnBottom); Scene scene = new Scene(bp, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); Button btnTop = new Button("Top"); bp.setTop(btnTop);/*from w ww . j a v a 2s .co m*/ Button btnLeft = new Button("Left"); bp.setLeft(btnLeft); Button btnCenter = new Button("Center"); bp.setCenter(btnCenter); Button btnRight = new Button("Right"); bp.setRight(btnRight); Button btnBottom = new Button("Bottom"); bp.setBottom(btnBottom); Scene scene = new Scene(bp, 300, 200); primaryStage.setScene(scene); primaryStage.show(); System.out.println(bp.getTop()); System.out.println(bp.getBottom()); System.out.println(bp.getLeft()); System.out.println(bp.getRight()); System.out.println(bp.getCenter()); }
From source file:Main.java
@Override public void start(final Stage stage) { final Node loginPanel = makeDraggable(createLoginPanel()); final Node confirmationPanel = makeDraggable(createConfirmationPanel()); final Node progressPanel = makeDraggable(createProgressPanel()); loginPanel.relocate(0, 0);// ww w .jav a 2 s .com confirmationPanel.relocate(0, 67); progressPanel.relocate(0, 106); final Pane panelsPane = new Pane(); panelsPane.getChildren().addAll(loginPanel, confirmationPanel, progressPanel); final BorderPane sceneRoot = new BorderPane(); BorderPane.setAlignment(panelsPane, Pos.TOP_LEFT); sceneRoot.setCenter(panelsPane); final CheckBox dragModeCheckbox = new CheckBox("Drag mode"); BorderPane.setMargin(dragModeCheckbox, new Insets(6)); sceneRoot.setBottom(dragModeCheckbox); dragModeActiveProperty.bind(dragModeCheckbox.selectedProperty()); final Scene scene = new Scene(sceneRoot, 400, 300); stage.setScene(scene); stage.setTitle("Draggable Panels Example"); stage.show(); }
From source file:eu.ggnet.dwoss.util.OkCancelStage.java
public OkCancelStage(String title, T payload) { this.payload = payload; BorderPane pane = new BorderPane(); pane.setCenter(payload);//from ww w .ja va 2s . c o m Button okButton = new Button("Ok"); okButton.defaultButtonProperty(); Button cancelButton = new Button("Abbrechen"); cancelButton.setCancelButton(true); HBox bottom = new HBox(); bottom.setPadding(new Insets(10)); bottom.getChildren().addAll(okButton, cancelButton); pane.setBottom(bottom); if (!StringUtils.isBlank(title)) setTitle(title); setScene(new Scene(pane)); okButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { OkCancelStage.this.ok = true; close(); } }); cancelButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { close(); } }); }
From source file:org.pdfsam.ui.dialog.OverwriteConfirmationDialog.java
@Inject public OverwriteConfirmationDialog(StylesConfig styles) { initModality(Modality.WINDOW_MODAL); initStyle(StageStyle.UTILITY);//from ww w. ja va 2s .c o m setResizable(false); BorderPane containerPane = new BorderPane(); containerPane.getStyleClass().addAll(Style.CONTAINER.css()); containerPane.getStyleClass().addAll("-pdfsam-dialog", "-pdfsam-warning-dialog"); containerPane.setCenter(dialogContent); HBox buttons = new HBox(buildButton(DefaultI18nContext.getInstance().i18n("Overwrite"), true), buildButton(DefaultI18nContext.getInstance().i18n("Cancel"), false)); buttons.getStyleClass().add("-pdfsam-dialog-buttons"); containerPane.setBottom(buttons); Scene scene = new Scene(containerPane); scene.getStylesheets().addAll(styles.styles()); scene.setOnKeyReleased(new HideOnEscapeHandler(this)); setScene(scene); }