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


Java Color.BLUE属性代码示例

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


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

示例1: getPaint

private static Paint getPaint(IPixel p)
{
    switch (p.getColor())
    {
        case 0:
            return (Color.RED);
        case 1:
            return (Color.LIME);//color set to lime, because it is fully saturated (unlike "green")
        case 2:
            return (Color.BLUE);
        case 3:
            return (Color.GRAY);
        case 4:
            return (Color.BLACK);
        case 5:
            return (Color.WHITE);
        default:
            throw new IllegalStateException("Invalid color code " + p.getColor() + ".");
    }
}
 
开发者ID:AutonomousCarProject,项目名称:AutonomousCar,代码行数:20,代码来源:AlternatingBlobDetectionRender.java

示例2: getPaint

private static Paint getPaint(IPixel p)
{
    switch (p.getColor())
    {
        case 0:
            return (Color.RED);
        case 1:
            return (Color.LIME);
        case 2:
            return (Color.BLUE);
        case 3:
            return (Color.GRAY);
        case 4:
            return (Color.BLACK);
        case 5:
            return (Color.WHITE);
        default:
            throw new IllegalStateException("Invalid color code " + p.getColor() + ".");
    }
}
 
开发者ID:AutonomousCarProject,项目名称:AutonomousCar,代码行数:20,代码来源:BlobDetectionRender.java

示例3: adjustColors

private void adjustColors() {
    Color aboveColor = series.getColor();
    Color belowColor;
    if (null == aboveColor ||
        Color.WHITE.equals(aboveColor) ||
        Color.BLACK.equals(aboveColor) ||
        Color.TRANSPARENT.equals(aboveColor)) {
        aboveColor = Color.BLUE;
        belowColor = Color.RED;
    } else {
        belowColor = Helper.getComplementaryColor(aboveColor);
    }
    aboveColors = Helper.createColorVariationsAsList(aboveColor, noOfBands);
    belowColors = Helper.createColorVariationsAsList(belowColor, noOfBands);
}
 
开发者ID:HanSolo,项目名称:horizon,代码行数:15,代码来源:HorizonChart.java

示例4: 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

示例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: PixelMatrix

public PixelMatrix() {
    this(250, 250, 32, 32, Color.BLUE, Color.TRANSPARENT, PixelShape.SQUARE);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:PixelMatrix.java

示例8: Location

public Location() {
    this(0, 0, 0, Instant.now(), "", "", Color.BLUE);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:Location.java


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