Java Code Examples for javafx.scene.layout.BorderPane#setBackground()
The following examples show how to use
javafx.scene.layout.BorderPane#setBackground() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientDisplay.java From Open-Lowcode with Eclipse Public License 2.0 | 6 votes |
/** * @return a display with no page shown */ public Node getEmptyDisplay() { logger.severe("Setting empty display"); BorderPane mainpane = new BorderPane(); mainpane.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null))); connectionbar = new ConnectionBar(this, urltoconnectto, this.questionmarkicon); this.userinteractionwidgets.add(connectionbar); Pane connectionpanel = connectionbar.getPane(); mainpane.setTop(connectionpanel); BorderPane.setMargin(connectionpanel, new Insets(3, 5, 3, 5)); Pane statusbar = generateStatusBar(); mainpane.setBottom(statusbar); BorderPane.setMargin(statusbar, new Insets(3, 5, 3, 5)); ScrollPane contentholder = new ScrollPane(); contentholder.setStyle("-fx-background: rgb(255,255,255);"); contentholder.setBorder(Border.EMPTY); mainpane.setCenter(contentholder); this.contentholder = contentholder; return mainpane; }
Example 2
Source File: GuiMainPreloader.java From BlockMap with MIT License | 6 votes |
@Override public void start(Stage stage) throws Exception { splashScreen = stage; stage.centerOnScreen(); stage.initStyle(StageStyle.TRANSPARENT); stage.getIcons().add(new Image(getClass().getResourceAsStream("icon.png"))); ImageView icon = new ImageView(getClass().getResource("icon.png").toString()); icon.setFitWidth(SPLASH_WIDTH); icon.setPreserveRatio(true); BorderPane parent = new BorderPane(icon); parent.setBackground(Background.EMPTY); Scene scene = new Scene(parent, SPLASH_WIDTH, SPLASH_HEIGHT); scene.setFill(Color.TRANSPARENT); splashScreen.setScene(scene); splashScreen.show(); }
Example 3
Source File: CalibratePatchesBase.java From testing-video with GNU General Public License v3.0 | 6 votes |
protected Parent overlay(Args args) { Color fill = getTextFill(args); TextFlow topLeft = text(fill, getTopLeftText(args), LEFT); TextFlow topCenter = text(fill, getTopCenterText(args), CENTER); TextFlow topRight = text(fill, getTopRightText(args), RIGHT); TextFlow bottomLeft = text(fill, getBottomLeftText(args), LEFT); TextFlow bottomCenter = text(fill, getBottomCenterText(args), CENTER); TextFlow bottomRight = text(fill, getBottomRightText(args), RIGHT); StackPane top = new StackPane(topLeft, topCenter, topRight); StackPane bottom = new StackPane(bottomLeft, bottomCenter, bottomRight); BorderPane.setMargin(top, new Insets(20)); BorderPane.setMargin(bottom, new Insets(20)); BorderPane layout = new BorderPane(); layout.setBackground(EMPTY); layout.setTop(top); layout.setBottom(bottom); return layout; }