Example usage for javafx.scene.layout StackPane setMinSize

List of usage examples for javafx.scene.layout StackPane setMinSize

Introduction

In this page you can find the example usage for javafx.scene.layout StackPane setMinSize.

Prototype

public void setMinSize(double minWidth, double minHeight) 

Source Link

Document

Convenience method for overriding the region's computed minimum width and height.

Usage

From source file:de.hs.mannheim.modUro.controller.diagram.fx.ChartViewerSkin.java

/**
 * Creates the node representing this control.
 *
 * @return The node./*from  w ww. j  a  v  a 2 s.  c  o m*/
 */
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;
}