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