本文整理汇总了Java中javafx.scene.paint.Color.LIGHTGREEN属性的典型用法代码示例。如果您正苦于以下问题:Java Color.LIGHTGREEN属性的具体用法?Java Color.LIGHTGREEN怎么用?Java Color.LIGHTGREEN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javafx.scene.paint.Color
的用法示例。
在下文中一共展示了Color.LIGHTGREEN属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: NodePropertiesSample
public NodePropertiesSample() {
super(300,100);
//X position of node = X + LayoutX + TranslateX
rectA = new Rectangle(50, 50, Color.LIGHTSALMON);
//set position of node temporary (can be changed after)
rectA.setTranslateX(10);
rectB = new Rectangle(50, 50, Color.LIGHTGREEN);
//set position of node when addinf to some layout
rectB.setLayoutX(20);
rectB.setLayoutY(10);
rectC = new Rectangle(50, 50, Color.DODGERBLUE);
//last posibility of setting X position of node
rectC.setX(30);
rectC.setY(20);
//opacity of node can be set
rectC.setOpacity(0.8);
// REMOVE ME
setControls(
new SimplePropertySheet.PropDesc("Rectangle A translate X", rectA.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle B translate X", rectB.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle C translate X", rectC.translateXProperty(), 0d, 50d),
new SimplePropertySheet.PropDesc("Rectangle A Opacity", rectA.opacityProperty(), 0d, 1d),
new SimplePropertySheet.PropDesc("Rectangle B Opacity", rectB.opacityProperty(), 0d, 1d),
new SimplePropertySheet.PropDesc("Rectangle C Opacity", rectC.opacityProperty(), 0d, 1d)
);
getChildren().add(createRadioButtons());
// END REMOVE ME
Group g = new Group(rectA, rectB, rectC);
g.setLayoutX(160 + 35);
getChildren().addAll(g);
}