List of usage examples for javafx.scene.layout BorderPane setPrefSize
public void setPrefSize(double prefWidth, double prefHeight)
From source file:de.hs.mannheim.modUro.controller.diagram.fx.ChartViewerSkin.java
/** * Creates the node representing this control. * * @return The node./*from www. jav a 2s . c om*/ */ private BorderPane createNode(ChartViewer control) { BorderPane borderPane = new BorderPane(); borderPane.setPrefSize(800, 500); StackPane sp = new StackPane(); sp.setMinSize(10, 10); sp.setPrefSize(150, 200); this.canvas = new ChartCanvas(getSkinnable().getChart()); this.canvas.setTooltipEnabled(control.isTooltipEnabled()); this.canvas.addChartMouseListener(control); this.canvas.widthProperty().bind(sp.widthProperty()); this.canvas.heightProperty().bind(sp.heightProperty()); this.canvas.addMouseHandler(new ZoomHandlerFX("zoom", control)); sp.getChildren().add(this.canvas); borderPane.setCenter(sp); return borderPane; }