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


Java Color.RED属性代码示例

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


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

示例1: setNegativeColors

public void setNegativeColors(final List<Color> COLORS) {
    if (COLORS.size() < getNoOfBands()) {
        Color negativeBaseColor = COLORS.get(0);
        if (null == negativeBaseColor) { negativeBaseColor = Color.RED; }
        belowColors = Helper.createColorVariationsAsList(negativeBaseColor, getNoOfBands());
    } else {
        belowColors = COLORS;
    }
    drawChart();
}
 
开发者ID:HanSolo,项目名称:horizon,代码行数:10,代码来源:HorizonChart.java

示例2: setPositiveColors

public void setPositiveColors(final List<Color> COLORS) {
    if (COLORS.size() < getNoOfBands()) {
        Color positiveBaseColor = COLORS.get(0);
        if (null == positiveBaseColor) { positiveBaseColor = Color.RED; }
        aboveColors = Helper.createColorVariationsAsList(positiveBaseColor, getNoOfBands());
    } else {
        aboveColors = COLORS;
    }
    drawChart();
}
 
开发者ID:HanSolo,项目名称:horizon,代码行数:10,代码来源:HorizonChart.java

示例3: beforeEach

@Override
public void beforeEach() {
    graphVisualizer = mock(GraphVisualizer.class);
    graphMovementCalculator = mock(GraphMovementCalculator.class);
    settings = mock(Settings.class);
    createContextOfTest();

    basicSettingsViewController = new BasicSettingsViewController();
    injectMembers(basicSettingsViewController);

    final SimpleDoubleProperty height = new SimpleDoubleProperty();
    height.setValue(20);
    when(graphVisualizer.getNodeHeightProperty()).thenReturn(height);


    final SimpleDoubleProperty panning = new SimpleDoubleProperty(21);
    when(graphMovementCalculator.getPanningSensitivityProperty()).thenReturn(panning);

    final SimpleDoubleProperty zooming = new SimpleDoubleProperty(0.042);
    when(graphMovementCalculator.getZoomingSensitivityProperty()).thenReturn(zooming);

    final ObjectProperty<Color> color = new SimpleObjectProperty<>(Color.RED);
    when(graphVisualizer.getEdgeColorProperty()).thenReturn(color);

    colorPicker = mock(ColorPicker.class);
    when(colorPicker.getValue()).thenReturn(Color.YELLOW);

    slider = mock(Slider.class);
    when(slider.getValue()).thenReturn(42.42);

    mouseEvent = mock(MouseEvent.class);
    actionEvent = mock(ActionEvent.class);

    captor = ArgumentCaptor.forClass(Runnable.class);
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:35,代码来源:BasicSettingsViewControllerTest.java

示例4: create3dContent

public Node create3dContent() {
    Cube c = new Cube(50,Color.RED,1);
    c.rx.setAngle(45);
    c.ry.setAngle(45);
    Cube c2 = new Cube(50,Color.GREEN,1);
    c2.setTranslateX(100);
    c2.rx.setAngle(45);
    c2.ry.setAngle(45);
    Cube c3 = new Cube(50,Color.ORANGE,1);
    c3.setTranslateX(-100);
    c3.rx.setAngle(45);
    c3.ry.setAngle(45);

    animation = new Timeline();
    animation.getKeyFrames().addAll(
            new KeyFrame(Duration.ZERO,
                    new KeyValue(c.ry.angleProperty(), 0d),
                    new KeyValue(c2.rx.angleProperty(), 0d),
                    new KeyValue(c3.rz.angleProperty(), 0d)
            ),
            new KeyFrame(Duration.seconds(1),
                    new KeyValue(c.ry.angleProperty(), 360d),
                    new KeyValue(c2.rx.angleProperty(), 360d),
                    new KeyValue(c3.rz.angleProperty(), 360d)
            ));
    animation.setCycleCount(Animation.INDEFINITE);

    return new Group(c,c2,c3);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:Cube3D.java

示例5: BooleanIndicatorControl

public BooleanIndicatorControl(String name) {
	super(name, FlashboardSendableType.BOOL_INDICATOR);
	
	indicator = new Rectangle(WIDTH, HEIGHT, Color.RED);
	root = new VBox();
	root.setSpacing(5.0);
	root.setAlignment(Pos.CENTER);
	root.getChildren().addAll(indicator, new Label(name));
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:9,代码来源:BooleanIndicatorControl.java

示例6: testContentBoundChanged

@Test
public void testContentBoundChanged() throws Exception {
	Rectangle rect = new Rectangle(128, 128, Color.RED);
	pane.setContent(rect);
	Thread.sleep(50);
	rect.setWidth(1000);
	rect.setHeight(1000);
	Thread.sleep(50);
	rect.setHeight(0);
	rect.setHeight(0);
}
 
开发者ID:tom91136,项目名称:GestureFX,代码行数:11,代码来源:GesturePaneTest.java

示例7: 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:jalian-systems,项目名称:marathonv5,代码行数:14,代码来源:StopWatchSample.java

示例8: AccordionSample

public AccordionSample() {
    super(150,150);
    TitledPane t1 = new TitledPane("Node 1", new Button("Button"));
    TitledPane t2 = new TitledPane("Node 2", new Text("String"));
    TitledPane t3 = new TitledPane("Node 3", new Rectangle(120,50, Color.RED));
    Accordion accordion = new Accordion();
    accordion.getPanes().add(t1);
    accordion.getPanes().add(t2);
    accordion.getPanes().add(t3);
    getChildren().add(accordion);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:11,代码来源:AccordionSample.java

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

示例10: LightningReactor

public LightningReactor(int i, int j, EventHandler<? super LightningEvent> lightningEventHandler) {
    super(SIZE, SIZE);

    this.i = i;
    this.j = j;

    Color baseColor = (i + j) % 2 == 0 ? Color.RED : Color.WHITE;
    setFill(baseColor);

    fillTransition.setFromValue(Color.YELLOW);
    fillTransition.setToValue(baseColor);
    fillTransition.setShape(this);

    addEventHandler(LightningEvent.PLASMA_STRIKE, lightningEventHandler);
}
 
开发者ID:schwabdidier,项目名称:GazePlay,代码行数:15,代码来源:LightningSimulator.java

示例11: toolbarControlsFactory

@Override
public List<Node> toolbarControlsFactory() {
    List<Node> controls = super.toolbarControlsFactory();

    CheckBox ellipsesCheckBox = new CheckBox("Ellipses");
    ellipsesCheckBox.setSelected(true);
    ellipsesCheckBox.setOnAction(mouseEvent -> {
        plot.setProperty(ELLIPSES, ellipsesCheckBox.isSelected());
    });
    
    ChoiceBox<SigmaPresentationModes> uncertaintyChoiceBox = new ChoiceBox<>(FXCollections.observableArrayList(SigmaPresentationModes.values()));
    uncertaintyChoiceBox.setValue(SigmaPresentationModes.TWO_SIGMA_ABSOLUTE);
    uncertaintyChoiceBox.setConverter(new StringConverter<SigmaPresentationModes>() {
        @Override
        public String toString(SigmaPresentationModes object) {
            return object.getDisplayName();
        }

        @Override
        public SigmaPresentationModes fromString(String string) {
            return null;
        }
    });
    uncertaintyChoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<SigmaPresentationModes>() {
        @Override
        public void changed(ObservableValue observable, SigmaPresentationModes oldValue, SigmaPresentationModes newValue) {
            plot.setProperty(UNCERTAINTY, newValue.getSigmaMultiplier());
        }
    });

    ColorPicker ellipsesColorPicker = new ColorPicker(Color.RED);
    ellipsesColorPicker.setStyle(COLORPICKER_CSS_STYLE_SPECS);
    ellipsesColorPicker.setPrefWidth(100);
    ellipsesColorPicker.setOnAction(mouseEvent -> {
        // to satisfy D3
        plot.setProperty(ELLIPSE_FILL_COLOR, ellipsesColorPicker.getValue().toString().substring(0, 8).replaceAll("0x", "#"));
    });

    CheckBox concordiaLineCheckBox = new CheckBox("Concordia");
    concordiaLineCheckBox.setSelected(true);
    concordiaLineCheckBox.setOnAction(mouseEvent -> {
        plot.setProperty(CONCORDIA_LINE, concordiaLineCheckBox.isSelected());
    });

    CheckBox allSelectedCheckBox = new CheckBox("Select All");
    allSelectedCheckBox.setSelected(true);
    allSelectedCheckBox.setOnAction(mouseEvent -> {
        setSelectedAllData(allSelectedCheckBox.isSelected());
    });

    CheckBox regressionUnctEnvelopeCheckBox = new CheckBox("2D Regression Unct");
    regressionUnctEnvelopeCheckBox.setSelected(false);
    regressionUnctEnvelopeCheckBox.setOnAction(mouseEvent -> {
        plot.setProperty(REGRESSION_ENVELOPE, regressionUnctEnvelopeCheckBox.isSelected());
    });

    CheckBox regressionCheckBox = new CheckBox("2D Regression");
    regressionCheckBox.setSelected(false);
    regressionUnctEnvelopeCheckBox.setDisable(true);
    regressionCheckBox.setOnAction(mouseEvent -> {
        boolean isRegression = regressionCheckBox.isSelected();
        plot.setProperty(REGRESSION_LINE, isRegression);
        regressionUnctEnvelopeCheckBox.setDisable(!isRegression);
    });

    controls.add(ellipsesCheckBox);
    controls.add(uncertaintyChoiceBox);
    controls.add(ellipsesColorPicker);
    controls.add(allSelectedCheckBox);
    controls.add(concordiaLineCheckBox);
    controls.add(regressionCheckBox);
    controls.add(regressionUnctEnvelopeCheckBox);

    return controls;
}
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:75,代码来源:TopsoilPlotWetherill.java

示例12: init

@Override public void init() {
    List<XYChartItem> xyItems1 = new ArrayList<>();
    xyItems1.add(new XYChartItem(0.0, 45.0));
    xyItems1.add(new XYChartItem(145.0, 120.0));
    xyItems1.add(new XYChartItem(90.0, 150.0));
    xyItems1.add(new XYChartItem(225, 60));

    Helper.orderXYChartItemsByX(xyItems1, Order.ASCENDING);

    xySeries1 = new XYSeries(xyItems1, ChartType.POLAR, Color.rgb(255, 0, 0, 0.5), Color.RED);
    //xySeries1.setShowPoints(false);
    xySeries1.setStroke(Color.rgb(90, 90, 90));
    xySeries1.setSymbolStroke(Color.LIME);
    xySeries1.setSymbolFill(Color.GREEN);
    xySeries1.setSymbol(Symbol.SQUARE);

    XYPane polarPane = new XYPane(xySeries1);
    polarPane.setLowerBoundY(polarPane.getDataMinY());
    polarPane.setUpperBoundY(polarPane.getDataMaxY());

    polarChart = new PolarChart<>(polarPane);


    lastTimerCall = System.nanoTime();
    timer = new AnimationTimer() {
        @Override public void handle(final long now) {
            if (now > lastTimerCall + UPDATE_INTERVAL) {
                ObservableList<XYChartItem> xyItems = xySeries1.getItems();
                xyItems.forEach(item -> {
                    item.setX(RND.nextDouble() * 360.0);
                    item.setY(RND.nextDouble() * 8 + RND.nextDouble() * 10);
                });

                // Can be used to update charts but if more than one series is in one xyPane
                // it's easier to use the refresh() method of XYChart
                //xySeries1.refresh();
                //xySeries2.refresh();
                //xySeries3.refresh();
                //xySeries4.refresh();

                // Useful to refresh the chart if it contains more than one series to avoid
                // multiple redraws
                polarChart.refresh();

                lastTimerCall = now;
            }
        }
    };
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:49,代码来源:PolarChartTest.java

示例13: XYChartItem

public XYChartItem(final double X, final double Y, final String NAME) {
    this(X, Y, NAME, Color.RED, Color.TRANSPARENT, Symbol.NONE);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:XYChartItem.java

示例14: XYZChartItem

public XYZChartItem(final double X, final double Y, final double Z) {
    this(X, Y, Z, "", Color.RED, Color.TRANSPARENT, Symbol.NONE);
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:3,代码来源:XYZChartItem.java

示例15: MatrixChartItem

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


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