當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。