List of usage examples for javafx.scene.shape Rectangle setLayoutY
public final void setLayoutY(double value)
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);/*w w w.j a v a2s .com*/ Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.setStyle("-fx-fill: red; "); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);/*from ww w. j av a2 s .co m*/ Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.getStrokeDashArray().addAll(1.0, 13.0); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);//from www .jav a 2s. c o m Rectangle rect = new Rectangle(100, 100); rect.setLayoutX(50); rect.setLayoutY(50); rect.setStrokeLineCap(StrokeLineCap.BUTT); ((Group) scene.getRoot()).getChildren().add(rect); stage.show(); }
From source file:deincraftlauncher.InstallController.java
@Override public void initialize(URL url, ResourceBundle rb) { instance = this; System.out.println("Starting Installer UI..."); int saveX = 393; int cancelY = 165; int saveY = 200; int sizeX = 481; Rectangle separator = new Rectangle(); separator.setWidth(sizeX);/* w ww . ja v a 2 s. c o m*/ separator.setHeight(separatorSizeY); separator.setLayoutY(separatorY); separator.setFill(blueColor); mainPanel.getChildren().add(separator); mainPanel.setBackground(Background.EMPTY); TextButton cancel = new TextButton(saveX, cancelY, "cancel", Color.RED, mainPanel); cancel.setOnClick((TextButton tile) -> { cancel(); }); save = new TextButton(saveX, saveY, "Weiter", Color.GRAY, mainPanel); save.setFocusable(false); save.setOnClick((TextButton tile) -> { Continue(); }); login = new TextButton(14, 151, "Login", Color.BLUE, mainPanel); login.setOnClick((TextButton tile) -> { doLogin(null); }); Label Title = new Label(); Title.setText("Installer"); Title.setPrefSize(sizeX, separatorY); Title.setTextFill(Color.WHITESMOKE); Title.setTextAlignment(TextAlignment.CENTER); Title.setFont(DesignHelpers.getFocusFont(42)); Title.setAlignment(Pos.CENTER); mainPanel.getChildren().add(Title); pathLabel.setBackground(new Background(new BackgroundFill(Color.rgb(170, 170, 170), radii, insets))); //ContinueButton.setBackground(new Background(new BackgroundFill(Color.rgb(100, 190, 100), radii, insets))); //Green Version setDefaultPath(); System.out.println("starting done"); }
From source file:view.FXApplicationController.java
final public void computeKCfeatures() { overlay4.getChildren().clear();//from www. ja v a2s . c o m kcDetector.detect(displayBuffer[featureModel.getFeatureChannel()]); double percentageSum = kcDetector.getPercentageSum(); Set<Range<Integer>> kcPlotRanges = kcDetector.getKcRanges(); kComplexLabel.setVisible(true); kComplexLabel.setText("K-Complex: " + Math.round(percentageSum) + "%"); //draw yellow rectangles for every pair of coordinates in kcPlotRanges double start; double stop; for (Range<Integer> next : kcPlotRanges) { start = next.lowerEndpoint(); stop = next.upperEndpoint(); Rectangle r = new Rectangle(); r.layoutXProperty() .bind(this.xAxis.widthProperty().multiply((start + 1.) / (double) this.displayBuffer[0].length) .add(this.xAxis.layoutXProperty())); r.setLayoutY(0); r.widthProperty() .bind(xAxis.widthProperty().multiply((stop - start) / (double) this.displayBuffer[0].length)); r.heightProperty().bind(overlay4.heightProperty()); r.fillProperty().setValue(Color.LIGHTBLUE); r.opacityProperty().set(0.5); overlay4.getChildren().add(r); } lineChart.requestFocus(); }