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


Java Color.ORANGE屬性代碼示例

本文整理匯總了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);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:29,代碼來源:CubeSample.java

示例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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:29,代碼來源:Cube3D.java

示例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;
}
 
開發者ID:lukasbischof,項目名稱:Orsum-occulendi,代碼行數:32,代碼來源:StoneColor.java

示例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);
}
 
開發者ID:hendrikebbers,項目名稱:ExtremeGuiMakeover,代碼行數:29,代碼來源:AnimatedIcon.java

示例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);

    }
}
 
開發者ID:Luodian,項目名稱:Higher-Cloud-Computing-Project,代碼行數:27,代碼來源:DownController.java


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