當前位置: 首頁>>代碼示例>>Java>>正文


Java BorderPane.setBackground方法代碼示例

本文整理匯總了Java中javafx.scene.layout.BorderPane.setBackground方法的典型用法代碼示例。如果您正苦於以下問題:Java BorderPane.setBackground方法的具體用法?Java BorderPane.setBackground怎麽用?Java BorderPane.setBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.layout.BorderPane的用法示例。


在下文中一共展示了BorderPane.setBackground方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import javafx.scene.layout.BorderPane; //導入方法依賴的package包/類
@Override
public void start(Stage stage) {
  this.stage = stage;

  stage.initStyle(StageStyle.TRANSPARENT);

  VBox box = new VBox(20);
  box.setMaxWidth(Region.USE_PREF_SIZE);
  box.setMaxHeight(Region.USE_PREF_SIZE);
  box.setBackground(Background.EMPTY);
  String style = "-fx-background-color: rgba(255, 255, 255, 0.5);";
  box.setStyle(style);

  box.setPadding(new Insets(50));
  BorderPane root = new BorderPane(box);
  root.setStyle(style);
  root.setBackground(Background.EMPTY);
  Scene scene = new Scene(root);
  scene.setFill(Color.TRANSPARENT);
  stage.setScene(scene);

  ImageView splashView = new ImageView(splashImage);
  box.getChildren().addAll(splashView, new Label("ST Verification Studio is loading.."));
  stage.show();
  Rectangle2D primScreenBounds = Screen.getPrimary().getVisualBounds();
  stage.setX((primScreenBounds.getWidth() - stage.getWidth()) / 2);
  stage.setY((primScreenBounds.getHeight() - stage.getHeight()) / 2);
}
 
開發者ID:VerifAPS,項目名稱:stvs,代碼行數:29,代碼來源:StvsPreloader.java

示例2: overlay

import javafx.scene.layout.BorderPane; //導入方法依賴的package包/類
protected Parent overlay(int window, int yCode) {
    EncoderParameters params = getEncoderParameters();
    double ye = params.matrix.fromLumaCode(yCode);
    double yo = params.transfer.eotf(ye);
    CIExy xy = getColor(yo);

    String text = format("HDR10 grayscale CIE(x=%.4f, y=%.4f) %.1f%% Y%d,"
            + " %.1f nit", xy.x, xy.y, ye * 100.0, yCode, yo * 10000.0);

    Label label = new Label(text);
    label.setFont(font(40));
    label.setTextFill(gray(max(0.25, min(0.5, ye))));

    BorderPane.setMargin(label, new Insets(20));
    BorderPane layout = new BorderPane();
    layout.setBackground(EMPTY);
    layout.setBottom(label);
    return layout;
}
 
開發者ID:testing-av,項目名稱:testing-video,代碼行數:20,代碼來源:CalibrationBase.java

示例3: overlay

import javafx.scene.layout.BorderPane; //導入方法依賴的package包/類
private static Parent overlay(int version, int display,
        YCbCr params, int yCode, String suffix) {
    double ye = params.fromLumaCode(yCode);

    Label label = new Label(getLabel(version, display, params, yCode,
            suffix));
    label.setFont(font(40));
    label.setTextFill(gray(max(0.25, min(0.5, ye))));

    BorderPane.setMargin(label, new Insets(20));
    BorderPane layout = new BorderPane();
    layout.setBackground(EMPTY);
    layout.setBottom(label);
    return layout;
}
 
開發者ID:testing-av,項目名稱:testing-video,代碼行數:16,代碼來源:Calibrate2160pHDR10_LGOLED.java


注:本文中的javafx.scene.layout.BorderPane.setBackground方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。