当前位置: 首页>>代码示例>>Java>>正文


Java Color.GREEN属性代码示例

本文整理汇总了Java中javafx.scene.paint.Color.GREEN属性的典型用法代码示例。如果您正苦于以下问题:Java Color.GREEN属性的具体用法?Java Color.GREEN怎么用?Java Color.GREEN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javafx.scene.paint.Color的用法示例。


在下文中一共展示了Color.GREEN属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: start

@Override
public void start(Stage stage) {
    Node content = new Rectangle(1000, 700, Color.GREEN);
    ScrollPane scrollPane = new ScrollPane(content);
    scrollPane.setPrefSize(500, 300);

    ChangeListener<Object> changeListener = new ChangeListener<Object>() {
        @Override
        public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
            double hmin = scrollPane.getHmin();
            double hmax = scrollPane.getHmax();
            double hvalue = scrollPane.getHvalue();
            double contentWidth = content.getLayoutBounds().getWidth();
            double viewportWidth = scrollPane.getViewportBounds().getWidth();

            double hoffset =
                Math.max(0, contentWidth - viewportWidth) * (hvalue - hmin) / (hmax - hmin);

            double vmin = scrollPane.getVmin();
            double vmax = scrollPane.getVmax();
            double vvalue = scrollPane.getVvalue();
            double contentHeight = content.getLayoutBounds().getHeight();
            double viewportHeight = scrollPane.getViewportBounds().getHeight();

            double voffset =
                Math.max(0,  contentHeight - viewportHeight) * (vvalue - vmin) / (vmax - vmin);

            System.out.printf("Offset: [%.1f, %.1f] width: %.1f height: %.1f %n",
                    hoffset, voffset, viewportWidth, viewportHeight);
        }
    };
    scrollPane.viewportBoundsProperty().addListener(changeListener);
    scrollPane.hvalueProperty().addListener(changeListener);
    scrollPane.vvalueProperty().addListener(changeListener);

    Scene scene = new Scene(scrollPane, 640, 480);
    stage.setScene(scene);

    stage.show();
}
 
开发者ID:lttng,项目名称:lttng-scope,代码行数:40,代码来源:Example.java

示例5: start

@Override
public void start(Stage primaryStage) {
    if (primaryStage == null) {
        return;
    }

    //Create Circles
    Circle circleRed = new Circle(50.0, Color.RED);
    circleRed.setCursor(Cursor.HAND);
    circleRed.setOnMousePressed(circleOnMousePressedEventHandler);
    circleRed.setOnMouseDragged(circleOnMouseDraggedEventHandler);

    Circle circleGreen = new Circle(50.0, Color.GREEN);
    circleGreen.setCursor(Cursor.MOVE);
    circleGreen.setCenterX(150);
    circleGreen.setCenterY(150);
    circleGreen.setOnMousePressed(circleOnMousePressedEventHandler);
    circleGreen.setOnMouseDragged(circleOnMouseDraggedEventHandler);

    Circle circleBlue = new Circle(50.0, Color.BLUE);
    circleBlue.setCursor(Cursor.CROSSHAIR);
    circleBlue.setTranslateX(300);
    circleBlue.setTranslateY(100);
    circleBlue.setOnMousePressed(circleOnMousePressedEventHandler);
    circleBlue.setOnMouseDragged(circleOnMouseDraggedEventHandler);

    Group root = new Group();
    root.getChildren().addAll(circleRed, circleGreen, circleBlue);

    primaryStage.setResizable(false);
    primaryStage.setScene(new Scene(root, 400,350));

    primaryStage.setTitle("java-buddy");
    primaryStage.show();
}
 
开发者ID:lttng,项目名称:lttng-scope,代码行数:35,代码来源:ExampleMouseDrag.java

示例6: init

@Override public void init() {
    LegendItem item1 = new LegendItem(Symbol.CIRCLE, "Item 1", Color.RED, Color.BLACK);
    LegendItem item2 = new LegendItem(Symbol.SQUARE, "Item 2", Color.GREEN, Color.BLACK);
    LegendItem item3 = new LegendItem(Symbol.TRIANGLE, "Item 3", Color.BLUE, Color.BLACK);

    legend = new Legend(item1, item2, item3);
    legend.setOrientation(Orientation.VERTICAL);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:8,代码来源:LegendTest.java

示例7: beforeEach

@BeforeEach
void beforeEach() {
    colorSchemeIncomingEdges = new ColorSchemeIncomingEdges(10, Color.BLACK, Color.GREEN);
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:4,代码来源:ColorSchemeIncomingEdgesTest.java


注:本文中的javafx.scene.paint.Color.GREEN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。