List of usage examples for javafx.scene.paint Color DARKORANGE
Color DARKORANGE
To view the source code for javafx.scene.paint Color DARKORANGE.
Click Source Link
From source file:Main.java
@Override public void start(Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 500, 260); Rectangle roundRect = new Rectangle(50, 50, 400, 130); roundRect.setArcWidth(30);// w w w . ja v a 2 s . c o m roundRect.setArcHeight(60); roundRect.setFill(null); roundRect.setStroke(Color.DARKORANGE); roundRect.setStrokeWidth(2); roundRect.setStrokeLineCap(StrokeLineCap.BUTT); root.getChildren().add(roundRect); Slider slider = new Slider(30, 150, 30); slider.setLayoutX(250 - slider.getWidth() / 2); slider.setLayoutY(115 - slider.getHeight() / 2); slider.widthProperty().addListener((ov, curVal, newVal) -> { slider.setLayoutX(250 - slider.getWidth() / 2); }); slider.heightProperty() .addListener((ov, curVal, newVal) -> slider.setLayoutY(115 - slider.getHeight() / 2)); roundRect.arcWidthProperty().bind(slider.valueProperty()); root.getChildren().add(slider); Slider slider2 = new Slider(10, 120, 50); slider2.setLayoutX(50); slider2.setLayoutY(230); slider2.widthProperty().addListener((ov, curVal, newVal) -> { slider2.setLayoutX(250 - slider2.getWidth() / 2); }); roundRect.yProperty().bind(slider2.valueProperty()); root.getChildren().add(slider2); slider2.valueProperty().addListener((ov, curVal, newVal) -> slider .setLayoutY(slider.getLayoutY() + newVal.doubleValue() - curVal.doubleValue())); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setTitle("Imported Fruits"); stage.setWidth(500);/*www . java2s .c o m*/ stage.setHeight(500); ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList( new PieChart.Data("Grapefruit", 13), new PieChart.Data("Oranges", 25), new PieChart.Data("Plums", 10), new PieChart.Data("Pears", 22), new PieChart.Data("Apples", 30)); final PieChart chart = new PieChart(pieChartData); chart.setTitle("Imported Fruits"); final Label caption = new Label(""); caption.setTextFill(Color.DARKORANGE); caption.setStyle("-fx-font: 24 arial;"); for (final PieChart.Data data : chart.getData()) { data.getNode().addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent e) { caption.setTranslateX(e.getSceneX()); caption.setTranslateY(e.getSceneY()); caption.setText(String.valueOf(data.getPieValue()) + "%"); } }); } ((Group) scene.getRoot()).getChildren().addAll(chart, caption); stage.setScene(scene); //scene.getStylesheets().add("piechartsample/Chart.css"); stage.show(); }
From source file:org.noroomattheinn.visibletesla.LocationController.java
@Override protected void fxInitialize() { engine = webView.getEngine();//from w w w .ja v a 2 s.c o m progressIndicator.setVisible(false); multigauge = new MultiGauge(25, 8, 0, 100, -60, 320); multigauge.useGradient(Side.RIGHT, Color.DARKORANGE, Color.GREEN); multigauge.useGradient(Side.LEFT, Color.BLUE, Color.BLUE); multigauge.setLogScale(Side.RIGHT, true); Node mg = multigauge.getContainer(); AnchorPane.setTopAnchor(mg, 25.0); AnchorPane.setRightAnchor(mg, 10.0); root.getChildren().add(2, mg); multigauge.setVal(Side.LEFT, 20); multigauge.setVal(Side.RIGHT, 40); }