本文整理匯總了Java中javafx.scene.paint.Color.YELLOW屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.YELLOW屬性的具體用法?Java Color.YELLOW怎麽用?Java Color.YELLOW使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類javafx.scene.paint.Color
的用法示例。
在下文中一共展示了Color.YELLOW屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: RadialGradientSample
public RadialGradientSample() {
//create simple radial gradient
RadialGradient gradient1 = new RadialGradient(0, 0, 0.5, 0.5, 1, true, CycleMethod.NO_CYCLE, new Stop[] {
new Stop(0, Color.DODGERBLUE),
new Stop(1, Color.BLACK)
});
Circle circle1 = new Circle(45, 45, 40, gradient1);
//create complex radial gradient
RadialGradient gradient2 = new RadialGradient(20, 1, 0.5, 0.5, 0.6, true, CycleMethod.NO_CYCLE, new Stop[] {
new Stop(0, Color.TRANSPARENT),
new Stop(0.5, Color.DARKGRAY),
new Stop(0.64, Color.WHITESMOKE),
new Stop(0.65, Color.YELLOW),
new Stop(1, Color.GOLD)
});
Circle circle2 = new Circle(145, 45, 40, gradient2);
HBox hb = new HBox(10);
hb.getChildren().addAll(circle1, circle2);
// show the circles
getChildren().addAll(hb);
}
示例2: start
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Test");
primaryStage.setFullScreen(true);
Group root = new Group();
Scene scene = new Scene(root, 1200, 700, Color.BLACK);
Circle circle = new Circle(200, 300, 100, Color.YELLOW);
root.getChildren().add(circle);
GazeUtils.addEventFilter(circle);
primaryStage.setScene(scene);
primaryStage.show();
}
示例3: StoneColor
public StoneColor(ColorTypes type) {
super();
switch (type) {
case RED:
color = new SColor(Color.RED);
lightColor = new SColor(new Color(0.8, 0.4, 0.4, 1.0));
break;
case BLUE:
color = new SColor(Color.BLUE);
lightColor = new SColor(Color.LIGHTBLUE);
break;
case GREEN:
color = new SColor(Color.GREEN);
lightColor = new SColor(Color.LIGHTGREEN);
break;
case YELLOW:
color = new SColor(Color.YELLOW);
lightColor = new SColor(Color.LIGHTYELLOW);
break;
case ORANGE:
color = new SColor(Color.ORANGE);
lightColor = new SColor(new Color((double)0xDF / (double)0xFF, (double)0xC5 / (double)0xFF, (double)0x50 / (double)0xFF, 1.0));
break;
}
this.type = type;
}