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


Java Color.LIGHTGREEN屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:lukasbischof,項目名稱:Orsum-occulendi,代碼行數:32,代碼來源:StoneColor.java

示例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);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:37,代碼來源:NodePropertiesSample.java


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