Example usage for javafx.scene.layout StackPane heightProperty

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

Introduction

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

Prototype

public final ReadOnlyDoubleProperty heightProperty() 

Source Link

Usage

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

/**
 * Creates the node representing this control.
 *
 * @return The node.//from   ww w . j av  a2s.  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;
}

From source file:org.jfree.fx.demo.FXGraphics2DDemo1.java

@Override
public void start(Stage stage) throws Exception {
    XYDataset dataset = createDataset();
    JFreeChart chart = createChart(dataset);
    ChartCanvas canvas = new ChartCanvas(chart);
    StackPane stackPane = new StackPane();
    stackPane.getChildren().add(canvas);
    // Bind canvas size to stack pane size. 
    canvas.widthProperty().bind(stackPane.widthProperty());
    canvas.heightProperty().bind(stackPane.heightProperty());
    stage.setScene(new Scene(stackPane));
    stage.setTitle("FXGraphics2DDemo1.java");
    stage.setWidth(700);//from  ww w .  ja v  a2s  . c o m
    stage.setHeight(390);
    stage.show();
}

From source file:jp.ac.tohoku.ecei.sb.metabolome.lims.gui.MainWindowController.java

@FXML
void onShowCompoundIntensity(MouseEvent event) {
    if (tableCompound.getSelectionModel().isEmpty())
        return;/*from ww w.  j a v a 2 s. c o  m*/
    for (CompoundImpl compound : tableCompound.getSelectionModel().getSelectedItems()) {
        JFreeChart chart = getChartForCompound(compound);

        StackPane stackPane = new StackPane();
        ChartCanvas chartCanvas = new ChartCanvas(chart);
        stackPane.getChildren().add(chartCanvas);
        chartCanvas.widthProperty().bind(stackPane.widthProperty());
        chartCanvas.heightProperty().bind(stackPane.heightProperty());

        Scene scene = new Scene(stackPane);
        Stage stage = new Stage(StageStyle.UTILITY);
        stage.setScene(scene);
        stage.setWidth(800);
        stage.setHeight(600);
        stage.setTitle(compound.toString());
        stage.show();
    }
}