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


Java Color.BLACK属性代码示例

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


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

public SunburstChart(final TreeNode<T> TREE) {
    backgroundPaint        = Color.TRANSPARENT;
    borderPaint            = Color.TRANSPARENT;
    borderWidth            = 0d;
    segments               = new ArrayList<>(64);
    _visibleData           = VisibleData.NAME;
    _textOrientation       = TextOrientation.TANGENT;
    _backgroundColor       = Color.WHITE;
    _textColor             = Color.BLACK;
    _useColorFromParent    = false;
    _decimals              = 0;
    _interactive           = false;
    _autoTextColor         = true;
    _brightTextColor       = BRIGHT_TEXT_COLOR;
    _darkTextColor         = DARK_TEXT_COLOR;
    _useChartItemTextColor = false;
    formatString           = "%.0f";
    tree                   = TREE;
    levelMap               = new HashMap<>(8);
    sizeListener           = o -> resize();
    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:23,代码来源:SunburstChart.java

示例3: getColorAt

public Color getColorAt(final double POSITION_OF_COLOR) {
    if (stops.isEmpty()) return Color.BLACK;

    final double POSITION = Helper.clamp(0.0, 1.0, POSITION_OF_COLOR);
    final Color COLOR;
    if (stops.size() == 1) {
        final Map<Double, Color> ONE_ENTRY = (Map<Double, Color>) stops.entrySet().iterator().next();
        COLOR = stops.get(ONE_ENTRY.keySet().iterator().next()).getColor();
    } else {
        Stop lowerBound = stops.get(0.0);
        Stop upperBound = stops.get(1.0);
        for (Double fraction : stops.keySet()) {
            if (Double.compare(fraction,POSITION) < 0) {
                lowerBound = stops.get(fraction);
            }
            if (Double.compare(fraction, POSITION) > 0) {
                upperBound = stops.get(fraction);
                break;
            }
        }
        COLOR = interpolateColor(lowerBound, upperBound, POSITION);
    }
    return COLOR;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:24,代码来源:GradientLookup.java

示例4: start

@Override
public void start(Stage primaryStage) {

    primaryStage.setTitle("WindMill");

    primaryStage.setFullScreen(true);

    Group root = new Group();

    Scene scene = new Scene(root, Screen.getScreens().get(0).getWidth(), Screen.getScreens().get(0).getHeight(),
            Color.BLACK);

    Choices pictos = new Choices(scene);

    root.getChildren().add(pictos);

    primaryStage.setOnCloseRequest((WindowEvent we) -> System.exit(0));

    primaryStage.setScene(scene);

    primaryStage.show();

    SecondScreen.launch();
}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:24,代码来源:WindMill.java

示例5: Watch

public Watch() {
    startButton = new Button(Color.web("#8cc700"), Color.web("#71a000"));
    stopButton = new Button(Color.web("#AA0000"), Color.web("#660000"));

    mainDial = new Dial(117, true, 12, 60, Color.RED, true);
    minutesDial = new Dial(30, false, 12, 60, "minutes", Color.BLACK, false);
    tenthsDial = new Dial(30, false, 12, 60, "10ths", Color.BLACK, false);

    configureBackground();
    myLayout();
    configureListeners();
    configureTimeline();
    getChildren().addAll(background, minutesDial, tenthsDial, digitalClock, mainDial, startButton, stopButton);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:StopWatch.java

示例6: getColor

private Color getColor() {
  final Boolean data = getData();
  if (data == null) {
    return Color.BLACK;
  }

  if (data) {
    return trueColor.getValue();
  } else {
    return falseColor.getValue();
  }
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:12,代码来源:BooleanBoxWidget.java

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

示例8: start

@Override
public void start(Stage primaryStage) {
    Group root = new Group();
    Scene scene = new Scene(root, Color.BLACK);
    primaryStage.setScene(scene);

    Group squares = new Group();
    int SPACING = 1;
    for (int y = 0; y < HEIGHT; y += SIDE_SIZE + SPACING) {
        for (int x = 0; x < WIDTH; x += SIDE_SIZE + SPACING) {
            String color;
            if (Math.random() > 0.99) {
                color = "brown";
            } else {
                color = "orange";
            }
            Rectangle square = new Rectangle(SIDE_SIZE, SIDE_SIZE, Color.web(color));
            square.setX(x);
            square.setY(y);

            squares.getChildren().add(square);
        }
    }
    root.getChildren().add(squares);

    primaryStage.show();
}
 
开发者ID:slemonide,项目名称:GraphSpace,代码行数:27,代码来源:Main.java

示例9: SankeyPlot

public SankeyPlot() {
    getStylesheets().add(SankeyPlot.class.getResource("sankey-plot.css").toExternalForm());

    items              = FXCollections.observableArrayList();
    itemListener       = e -> redraw();
    itemListListener   = c -> {
        /*
        while (c.next()) {
            if (c.wasAdded()) {
                //c.getAddedSubList().forEach(addedItem -> addedItem.setOnChartItemEvent(itemListener));
            } else if (c.wasRemoved()) {
                //c.getRemoved().forEach(removedItem -> removedItem.removeChartItemEventListener(itemListener));
            }
        }
        */
        prepareData();
    };

    itemsPerLevel      = new LinkedHashMap<>();

    _streamFillMode    = StreamFillMode.COLOR;
    _streamColor       = DEFAULT_STREAM_COLOR;
    _textColor         = Color.BLACK;
    _itemWidth         = DEFAULT_ITEM_WIDTH;
    _autoItemWidth     = true;
    _itemGap           = DEFAULT_NODE_GAP;
    _autoItemGap       = true;
    _decimals          = 0;
    _showFlowDirection = false;
    _useItemColor      = true;
    _itemColor         = DEFAULT_ITEM_COLOR;
    _connectionOpacity = DEFAULT_OPACITY;

    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:sankeyplot,代码行数:36,代码来源:SankeyPlot.java

示例10: ChartData

public ChartData() {
    this("", 0, Color.rgb(233, 30, 99), Color.TRANSPARENT, Color.BLACK, Instant.now(), true, 800);
}
 
开发者ID:HanSolo,项目名称:SunburstChart,代码行数:3,代码来源:ChartData.java

示例11: Axis

public Axis(final double MIN_VALUE, final double MAX_VALUE, final Orientation ORIENTATION, final AxisType TYPE, final Position POSITION, final String TITLE) {
    if (VERTICAL == ORIENTATION) {
        if (Position.LEFT != POSITION && Position.RIGHT != POSITION && Position.CENTER != POSITION) {
            throw new IllegalArgumentException("Wrong combination of orientation and position!");
        }
    } else {
        if (Position.TOP != POSITION && Position.BOTTOM != POSITION && Position.CENTER != POSITION) {
            throw new IllegalArgumentException("Wrong combination of orientation and position!");
        }
    }

    _minValue                         = MIN_VALUE;
    _maxValue                         = MAX_VALUE;
    
    _type                             = TYPE;
    _autoScale                        = true;
    _title                            = TITLE;
    _unit                             = "";
    _orientation                      = ORIENTATION;
    _position                         = POSITION;
    _axisBackgroundColor              = Color.TRANSPARENT;
    _axisColor                        = Color.BLACK;
    _tickLabelColor                   = Color.BLACK;
    _titleColor                       = Color.BLACK;
    _minorTickMarkColor               = Color.BLACK;
    _mediumTickMarkColor              = Color.BLACK;
    _majorTickMarkColor               = Color.BLACK;
    _zeroColor                        = Color.BLACK;
    _zeroPosition                     = 0;
    _minorTickSpace                   = 1;
    _majorTickSpace                   = 10;
    _majorTickMarksVisible            = true;
    _mediumTickMarksVisible           = true;
    _minorTickMarksVisible            = true;
    _tickLabelsVisible                = true;
    _onlyFirstAndLastTickLabelVisible = false;
    _locale                           = Locale.US;
    _decimals                         = 0;
    _tickLabelOrientation             = TickLabelOrientation.HORIZONTAL;
    _tickLabelFormat                  = TickLabelFormat.NUMBER;
    _autoFontSize                     = true;
    _tickLabelFontSize                = 10;
    _titleFontSize                    = 10;
    _zoneId                           = ZoneId.systemDefault();
    _dateTimeFormatPattern            = "dd.MM.YY HH:mm:ss";
    currentInterval                   = Interval.SECOND_1;
    dateTimeFormatter                 = DateTimeFormatter.ofPattern(_dateTimeFormatPattern, _locale);
    categories                        = new LinkedList<>();
    tickLabelFormatString             = new StringBuilder("%.").append(Integer.toString(_decimals)).append("f").toString();

    initGraphics();
    registerListeners();
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:53,代码来源:Axis.java

示例12: Wall

public Wall(double size, double opacity) {
    this(size, opacity, Color.BLACK);
}
 
开发者ID:adihubba,项目名称:javafx-3d-surface-chart,代码行数:3,代码来源:Wall.java

示例13: ChartItem

public ChartItem(final String NAME) {
    this(NAME, 0, Color.rgb(233, 30, 99), Color.TRANSPARENT, Color.BLACK, Instant.now(), false, 800);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:ChartItem.java

示例14: XYSeries

public XYSeries() {
    this(null, ChartType.SCATTER, "", Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE,true);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:XYSeries.java

示例15: Series

public Series(final ChartType TYPE, final String NAME, final Paint FILL, final Paint STROKE, final Symbol SYMBOL, final T... ITEMS) {
    this(Arrays.asList(ITEMS), TYPE, NAME, FILL, STROKE, Color.BLACK, Color.BLACK, SYMBOL);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:Series.java


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