本文整理汇总了Java中javafx.scene.paint.Color.ORANGE属性的典型用法代码示例。如果您正苦于以下问题:Java Color.ORANGE属性的具体用法?Java Color.ORANGE怎么用?Java Color.ORANGE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javafx.scene.paint.Color
的用法示例。
在下文中一共展示了Color.ORANGE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create3dContent
@Override public Node create3dContent() {
Cube c = new Cube(50,Color.RED,1);
c.rx.setAngle(45);
c.ry.setAngle(45);
Cube c2 = new Cube(50,Color.GREEN,1);
c2.setTranslateX(100);
c2.rx.setAngle(45);
c2.ry.setAngle(45);
Cube c3 = new Cube(50,Color.ORANGE,1);
c3.setTranslateX(-100);
c3.rx.setAngle(45);
c3.ry.setAngle(45);
animation = new Timeline();
animation.getKeyFrames().addAll(
new KeyFrame(Duration.ZERO,
new KeyValue(c.ry.angleProperty(), 0d),
new KeyValue(c2.rx.angleProperty(), 0d),
new KeyValue(c3.rz.angleProperty(), 0d)
),
new KeyFrame(Duration.seconds(1),
new KeyValue(c.ry.angleProperty(), 360d),
new KeyValue(c2.rx.angleProperty(), 360d),
new KeyValue(c3.rz.angleProperty(), 360d)
));
animation.setCycleCount(Animation.INDEFINITE);
return new Group(c,c2,c3);
}
示例2: create3dContent
public Node create3dContent() {
Cube c = new Cube(50,Color.RED,1);
c.rx.setAngle(45);
c.ry.setAngle(45);
Cube c2 = new Cube(50,Color.GREEN,1);
c2.setTranslateX(100);
c2.rx.setAngle(45);
c2.ry.setAngle(45);
Cube c3 = new Cube(50,Color.ORANGE,1);
c3.setTranslateX(-100);
c3.rx.setAngle(45);
c3.ry.setAngle(45);
animation = new Timeline();
animation.getKeyFrames().addAll(
new KeyFrame(Duration.ZERO,
new KeyValue(c.ry.angleProperty(), 0d),
new KeyValue(c2.rx.angleProperty(), 0d),
new KeyValue(c3.rz.angleProperty(), 0d)
),
new KeyFrame(Duration.seconds(1),
new KeyValue(c.ry.angleProperty(), 360d),
new KeyValue(c2.rx.angleProperty(), 360d),
new KeyValue(c3.rz.angleProperty(), 360d)
));
animation.setCycleCount(Animation.INDEFINITE);
return new Group(c,c2,c3);
}
示例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;
}
示例4: AnimatedIcon
public AnimatedIcon() {
iconFill = new SimpleObjectProperty<>(Color.ORANGE);
line1 = new Line(4, 8, 28, 8);
line1.setStrokeWidth(3);
line1.strokeProperty().bind(iconFill);
line1.setManaged(false);
line1.setStrokeLineCap(StrokeLineCap.ROUND);
line2 = new Line(4, 16, 28, 16);
line2.setStrokeWidth(3);
line2.strokeProperty().bind(iconFill);
line2.setManaged(false);
line2.setStrokeLineCap(StrokeLineCap.ROUND);
line3 = new Line(4, 24, 28, 24);
line3.setStrokeWidth(3);
line3.strokeProperty().bind(iconFill);
line3.setManaged(false);
line3.setStrokeLineCap(StrokeLineCap.ROUND);
getChildren().addAll(line1, line2, line3);
setPrefWidth(32);
setPrefHeight(32);
setMinWidth(USE_PREF_SIZE);
setMinHeight(USE_PREF_SIZE);
setMaxWidth(USE_PREF_SIZE);
setMaxHeight(USE_PREF_SIZE);
}
示例5: toMove
private void toMove(){
for (Line line : curLines) {
Circle circle = new Circle(line.getStartX(), line.getStartY(), 7, Color.ORANGE);
Path curPath = new Path();
curPath.getElements().add(new MoveTo(line.getStartX(),line.getStartY()));
curPath.getElements().add(new CubicCurveTo(0.5 * (line.getStartX() + line.getEndX()),
0.5 * (line.getEndY() + line.getStartY()), 0.3*line.getStartX()+0.7*line.getEndX(),
0.3*line.getStartY()+0.7*line.getEndY(), line.getEndX(), line.getEndY()));
PathTransition curPathTransition = new PathTransition();
curPathTransition.setDuration(Duration.millis(line.getBaselineOffset() / (down_canvas.getPrefWidth() / 2) * 30000));
curPathTransition.setPath(curPath);
curPathTransition.setNode(circle);
curPathTransition.setOrientation(PathTransition.OrientationType.ORTHOGONAL_TO_TANGENT);
curPathTransition.setCycleCount(Timeline.INDEFINITE);
curPathTransition.setAutoReverse(false);
curPathTransition.play();
down_canvas.getChildren().addAll(circle,curPath);
if (curLines == downLines)
downCircles.add(circle);
else
mergeCircles.add(circle);
}
}