本文整理汇总了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);
}
示例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();
}
示例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);
}
示例4: beforeEach
@BeforeEach
void beforeEach() {
fixedColor = new FixedColorScheme(Color.ALICEBLUE);
}