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


Java Color.ALICEBLUE屬性代碼示例

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


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

示例1: initFX

private void initFX() {
    Platform.setImplicitExit(false);
    v = new WebView();
    BorderPane bp = new BorderPane();
    Scene scene = new Scene(bp, Color.ALICEBLUE);

    class X implements ChangeListener<String>, Runnable {

        private String title;

        public X() {
            super();
        }

        @Override
        public void changed(ObservableValue<? extends String> ov, String t, String t1) {
            title = v.getEngine().getTitle();
            EventQueue.invokeLater(this);
        }

        @Override
        public void run() {
            if (title != null) {
                HtmlComponent.this.setDisplayName(title);
            }
        }
    }
    final X x = new X();
    v.getEngine().titleProperty().addListener(x);
    Platform.runLater(x);
    bp.setCenter(v);
    p.setScene(scene);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:33,代碼來源:HtmlComponent.java

示例2: start

@Override
public void start(Stage stage) {
	VBox box = new VBox();
	Scene scene = new Scene(box, 180, 180);
	stage.setScene(scene);
	stage.setTitle("ScrollPaneSample");
	box.getChildren().addAll(sp, fileName);
	VBox.setVgrow(sp, Priority.ALWAYS);

	fileName.setLayoutX(30);
	fileName.setLayoutY(160);
	sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

	Color[] colors = new Color[] { Color.RED, Color.ALICEBLUE, Color.AQUA, Color.BEIGE, Color.BLANCHEDALMOND };
	for (int i = 0; i < 10; i++) {
		int cindex = (i + 5) % 5;
		Rectangle rectangle = new Rectangle(100, 50, colors[cindex]);
		rectangles[i] = rectangle;
		hb.getChildren().add(rectangle);
	}

	sp.setPrefSize(115, 150);
	sp.setContent(hb);
	fileName.setOnMouseClicked((e) -> {
		scrollTo(rectangles[4]);
	});
	stage.show();
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:28,代碼來源:ScrollPaneSample2.java

示例3: initFX

/**
 * Init JFXPanel which serves as a bridge between Swing and JavaFX
 * 
 * @param fxPanel
 */
private void initFX(JFXPanel fxPanel) {
	// This method is invoked on the JavaFX thread
	Group root = new Group();
	Scene scene = new Scene(root, Color.ALICEBLUE);
	fxPanel.setScene(scene);
}
 
開發者ID:michaelnetter,項目名稱:dracoon-dropzone,代碼行數:11,代碼來源:DropzonePopOver.java

示例4: beforeEach

@BeforeEach
void beforeEach() {
    fixedColor = new FixedColorScheme(Color.ALICEBLUE);
}
 
開發者ID:ProgrammingLife2017,項目名稱:hygene,代碼行數:4,代碼來源:FixedColorTest.java


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