List of usage examples for javafx.scene.layout Pane getWidth
public final double getWidth()
From source file:snpviewer.SnpViewer.java
public List<Line> drawLinesToPane(Pane pane, final ArrayList<HashMap<String, Double>> linemap) { List<Line> lines = new ArrayList(); for (HashMap<String, Double> l : linemap) { double width = pane.getWidth(); double coord = l.get("x"); Line line = new Line(l.get("x"), 0, l.get("x"), pane.getMinHeight()); line.setStroke(colorComp.get(l.get("color").intValue())); /*line.startXProperty().bind((pane.widthProperty().divide(width)).multiply(coord) ); line.endXProperty().bind((pane.widthProperty().divide(width)).multiply(coord) ); line.endYProperty().bind(pane.heightProperty().subtract(1));*/ lines.add(line);/*from w ww .j av a 2s.co m*/ //pane.getChildren().add(l); } return lines; }