Java Code Examples for javafx.scene.layout.FlowPane#setAlignment()

The following examples show how to use javafx.scene.layout.FlowPane#setAlignment() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RunDataSetSamples.java    From chart-fx with Apache License 2.0 6 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final BorderPane root = new BorderPane();

    final FlowPane buttons = new FlowPane();
    buttons.setAlignment(Pos.CENTER_LEFT);
    root.setCenter(buttons);
    root.setBottom(makeScreenShot);

    buttons.getChildren().add(new MyButton("DataSetToByteArraySample", () -> DataSetToByteArraySample.main(null)));

    final Scene scene = new Scene(root);

    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(evt -> Platform.exit());
    primaryStage.show();
}
 
Example 2
Source File: RunUiSamples.java    From chart-fx with Apache License 2.0 6 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final BorderPane root = new BorderPane();

    final FlowPane buttons = new FlowPane();
    buttons.setAlignment(Pos.CENTER_LEFT);
    root.setCenter(buttons);
    root.setBottom(makeScreenShot);

    buttons.getChildren().add(new MyButton("AcqButtonTests", new AcqButtonTests()));

    final Scene scene = new Scene(root);

    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(evt -> System.exit(0));
    primaryStage.show();
}
 
Example 3
Source File: FlowPaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    FlowPane fp = new FlowPane();
    fp.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    fp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] littleRecs = new Rectangle[4];
    Rectangle[] bigRecs = new Rectangle[4];
    for (int i = 0; i < 4; i++) {
        littleRecs[i] = new Rectangle(14, 14, Color.web("#1c89f4"));
        bigRecs[i] = new Rectangle(16, 12, Color.web("#349b00"));
        fp.getChildren().addAll(littleRecs[i], bigRecs[i]);
        FlowPane.setMargin(littleRecs[i], new Insets(2, 2, 2, 2));
    }
    sp.getChildren().addAll(rectangle, fp);
    return new Group(sp);
}
 
Example 4
Source File: FlowPaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    FlowPane fp = new FlowPane();
    fp.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    fp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] littleRecs = new Rectangle[4];
    Rectangle[] bigRecs = new Rectangle[4];
    for (int i = 0; i < 4; i++) {
        littleRecs[i] = new Rectangle(14, 14, Color.web("#1c89f4"));
        bigRecs[i] = new Rectangle(16, 12, Color.web("#349b00"));
        fp.getChildren().addAll(littleRecs[i], bigRecs[i]);
        FlowPane.setMargin(littleRecs[i], new Insets(2, 2, 2, 2));
    }
    sp.getChildren().addAll(rectangle, fp);
    return new Group(sp);
}
 
Example 5
Source File: PluginParametersDialog.java    From constellation with Apache License 2.0 5 votes vote down vote up
/**
 * Display a dialog box containing the parameters that allows the user to
 * enter values.
 *
 * @param owner The owner for this stage.
 * @param title The dialog box title.
 * @param parameters The plugin parameters.
 * @param options The dialog box button labels, one for each button.
 */
public PluginParametersDialog(final Stage owner, final String title, final PluginParameters parameters, final String... options) {
    initStyle(StageStyle.UTILITY);
    initModality(Modality.WINDOW_MODAL);
    initOwner(owner);

    setTitle(title);

    final BorderPane root = new BorderPane();
    root.setPadding(new Insets(10));
    root.setStyle("-fx-background-color: #DDDDDD;");
    final Scene scene = new Scene(root);
    setScene(scene);

    final PluginParametersPane parametersPane = PluginParametersPane.buildPane(parameters, null);
    root.setCenter(parametersPane);

    final FlowPane buttonPane = new FlowPane();
    buttonPane.setAlignment(Pos.BOTTOM_RIGHT);
    buttonPane.setPadding(new Insets(5));
    buttonPane.setHgap(5);
    root.setBottom(buttonPane);

    final String[] labels = options != null && options.length > 0 ? options : new String[]{OK, CANCEL};
    for (final String option : labels) {
        final Button okButton = new Button(option);
        okButton.setOnAction(event -> {
            result = option;
            parameters.storeRecentValues();
            PluginParametersDialog.this.hide();
        });
        buttonPane.getChildren().add(okButton);
    }

    // Without this, some parameter panes have a large blank area at the bottom. Huh?
    this.sizeToScene();

    result = null;
}
 
Example 6
Source File: RunMathSamples.java    From chart-fx with Apache License 2.0 5 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final BorderPane root = new BorderPane();

    final FlowPane buttons = new FlowPane();
    buttons.setAlignment(Pos.CENTER_LEFT);
    root.setCenter(buttons);
    root.setBottom(makeScreenShot);

    buttons.getChildren().add(new MyButton("DataSetAverageSample", new DataSetAverageSample()));
    buttons.getChildren().add(new MyButton("DataSetFilterSample", new DataSetFilterSample()));
    buttons.getChildren()
            .add(new MyButton("DataSetIntegrateDifferentiateSample", new DataSetIntegrateDifferentiateSample()));
    buttons.getChildren()
            .add(new MyButton("DataSetIntegrationWithLimitsSample", new DataSetIntegrationWithLimitsSample()));
    buttons.getChildren().add(new MyButton("DataSetSpectrumSample", new DataSetSpectrumSample()));
    buttons.getChildren().add(new MyButton("EMDSample", new EMDSample()));
    buttons.getChildren().add(new MyButton("FourierSample", new FourierSample()));
    buttons.getChildren().add(new MyButton("FrequencyFilterSample", new FrequencyFilterSample()));
    buttons.getChildren().add(new MyButton("GaussianFitSample", new GaussianFitSample()));
    // buttons.getChildren().add(new MyButton("IIRFilterSample", new IIRFilterSample()));
    buttons.getChildren().add(new MyButton("IIRFrequencyFilterSample", new IIRFrequencyFilterSample()));
    buttons.getChildren().add(new MyButton("ShortTermFourierTransform", new ShortTimeFourierTransformSample()));
    buttons.getChildren().add(new MyButton("TSpectrum", new TSpectrumSample()));
    buttons.getChildren().add(new MyButton("WaveletDenoising", new WaveletDenoising()));
    buttons.getChildren().add(new MyButton("WaveletScalogram", new WaveletScalogram()));

    final Scene scene = new Scene(root);

    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(evt -> System.exit(0));
    primaryStage.show();
}
 
Example 7
Source File: ConsolidatedDialog.java    From constellation with Apache License 2.0 4 votes vote down vote up
/**
 * A generic multiple matches dialog which can be used to display a
 * collection of ObservableList items
 *
 * @param title The title of the dialog
 * @param observableMap The map of {@code ObservableList} objects
 * @param message The (help) message that will be displayed at the top of
 * the dialog window
 * @param listItemHeight The height of each list item. If you have a single
 * row of text then set this to 24.
 */
public ConsolidatedDialog(String title, Map<String, ObservableList<Container<K, V>>> observableMap, String message, int listItemHeight) {
    final BorderPane root = new BorderPane();
    root.setStyle("-fx-background-color: #DDDDDD;-fx-border-color: #3a3e43;-fx-border-width: 4px;");

    // add a title
    final Label titleLabel = new Label();
    titleLabel.setText(title);
    titleLabel.setStyle("-fx-font-size: 11pt;-fx-font-weight: bold;");
    titleLabel.setAlignment(Pos.CENTER);
    titleLabel.setPadding(new Insets(5));
    root.setTop(titleLabel);

    final Accordion accordion = new Accordion();
    for (String identifier : observableMap.keySet()) {
        final ObservableList<Container<K, V>> objects = observableMap.get(identifier);
        ListView<Container<K, V>> listView = new ListView<>(objects);
        listView.setEditable(false);
        listView.setPrefHeight((listItemHeight * objects.size()));
        listView.getSelectionModel().selectedItemProperty().addListener(event -> {
            listView.getItems().get(0).getKey();
            final Container<K, V> container = listView.getSelectionModel().getSelectedItem();
            if (container != null) {
                selectedObjects.add(new Pair<>(container.getKey(), container.getValue()));
            } else {
                // the object was unselected so go through the selected objects and remove them all because we don't know which one was unselected
                for (Container<K, V> object : listView.getItems()) {
                    selectedObjects.remove(new Pair<>(object.getKey(), object.getValue()));
                }
            }
        });

        final TitledPane titledPane = new TitledPane(identifier, listView);
        accordion.getPanes().add(titledPane);
    }

    final HBox help = new HBox();
    help.getChildren().add(helpMessage);
    help.getChildren().add(new ImageView(UserInterfaceIconProvider.HELP.buildImage(16, ConstellationColor.AZURE.getJavaColor())));
    help.setPadding(new Insets(10, 0, 10, 0));
    helpMessage.setText(message + "\n\nNote: To deselect hold Ctrl when you click.");
    helpMessage.setStyle("-fx-font-size: 11pt;");
    helpMessage.setWrapText(true);
    helpMessage.setPadding(new Insets(5));

    final VBox box = new VBox();
    box.getChildren().add(help);

    // add the multiple matching accordion
    box.getChildren().add(accordion);

    final ScrollPane scroll = new ScrollPane();
    scroll.setContent(box);
    scroll.setFitToWidth(true);
    scroll.setHbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
    root.setCenter(scroll);

    final FlowPane buttonPane = new FlowPane();
    buttonPane.setAlignment(Pos.BOTTOM_RIGHT);
    buttonPane.setPadding(new Insets(5));
    buttonPane.setHgap(5);
    root.setBottom(buttonPane);

    useButton = new Button("Continue");
    buttonPane.getChildren().add(useButton);
    accordion.expandedPaneProperty().set(null);

    final Scene scene = new Scene(root);
    fxPanel.setScene(scene);
    fxPanel.setPreferredSize(new Dimension(500, 500));
}
 
Example 8
Source File: VertexGraphLabelsEditorFactory.java    From constellation with Apache License 2.0 4 votes vote down vote up
@Override
protected Node createEditorControls() {
    // get all vertex attributes currently in the graph
    final ReadableGraph rg = GraphManager.getDefault().getActiveGraph().getReadableGraph();
    try {
        for (int i = 0; i < rg.getAttributeCount(GraphElementType.VERTEX); i++) {
            attributeNames.add(rg.getAttributeName(rg.getAttribute(GraphElementType.VERTEX, i)));
        }
    } finally {
        rg.release();
    }
    attributeNames.sort(String::compareTo);

    HBox labelTitles = new HBox();
    final Label attrLabel = new Label("Attribute");
    attrLabel.setAlignment(Pos.CENTER);
    attrLabel.setPrefWidth(150);
    final Label colorLabel = new Label("Colour");
    colorLabel.setPrefWidth(40);
    colorLabel.setAlignment(Pos.CENTER);
    final Label sizeLabel = new Label("Size");
    sizeLabel.setPrefWidth(50);
    sizeLabel.setAlignment(Pos.CENTER);
    final Label positionLabel = new Label("Position");
    positionLabel.setPrefWidth(115);
    positionLabel.setAlignment(Pos.CENTER);
    labelTitles.getChildren().addAll(attrLabel, colorLabel, sizeLabel, positionLabel);
    labelPaneContent.setPadding(new Insets(5));
    labelPaneContent.getChildren().addAll(labelTitles, labelEntries);

    final ScrollPane labelsScrollPane = new ScrollPane();
    labelsScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    labelsScrollPane.setPrefHeight(200);
    labelsScrollPane.setPrefWidth(400);
    labelsScrollPane.setContent(labelPaneContent);

    addButton.setOnAction(e -> {
        new LabelEntry(labels, labelEntries, attributeNames.isEmpty() ? "" : attributeNames.get(0), ConstellationColor.LIGHT_BLUE, 1);
        addButton.setDisable(labels.size() == GraphLabels.MAX_LABELS);
        update();
    });
    final Label addButtonLabel = new Label("Add Label");
    final FlowPane addPane = new FlowPane();
    addPane.setHgap(10);
    addPane.setAlignment(Pos.CENTER_RIGHT);
    addPane.getChildren().addAll(addButtonLabel, addButton);

    final VBox controls = new VBox(10);
    controls.setPrefWidth(400);
    controls.getChildren().addAll(labelsScrollPane, addPane);

    return controls;
}
 
Example 9
Source File: TransactionGraphLabelsEditorFactory.java    From constellation with Apache License 2.0 4 votes vote down vote up
@Override
protected Node createEditorControls() {
    // get all transaction attributes currently in the graph
    final ReadableGraph rg = GraphManager.getDefault().getActiveGraph().getReadableGraph();
    try {
        for (int i = 0; i < rg.getAttributeCount(GraphElementType.TRANSACTION); i++) {
            attributeNames.add(rg.getAttributeName(rg.getAttribute(GraphElementType.TRANSACTION, i)));
        }
    } finally {
        rg.release();
    }
    attributeNames.sort(String::compareTo);

    final HBox labelTitles = new HBox();
    final Label attrLabel = new Label("Attribute");
    attrLabel.setAlignment(Pos.CENTER);
    attrLabel.setPrefWidth(150);
    final Label colorLabel = new Label("Colour");
    colorLabel.setPrefWidth(40);
    colorLabel.setAlignment(Pos.CENTER);
    final Label sizeLabel = new Label("Size");
    sizeLabel.setPrefWidth(50);
    sizeLabel.setAlignment(Pos.CENTER);
    final Label positionLabel = new Label("Position");
    positionLabel.setPrefWidth(115);
    positionLabel.setAlignment(Pos.CENTER);
    labelTitles.getChildren().addAll(attrLabel, colorLabel, sizeLabel, positionLabel);
    labelPaneContent.setPadding(new Insets(5));
    labelPaneContent.getChildren().addAll(labelTitles, labelEntries);

    final ScrollPane labelsScrollPane = new ScrollPane();
    labelsScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    labelsScrollPane.setPrefHeight(200);
    labelsScrollPane.setPrefWidth(400);
    labelsScrollPane.setContent(labelPaneContent);

    addButton.setOnAction(e -> {
        new LabelEntry(labels, labelEntries, attributeNames.isEmpty() ? "" : attributeNames.get(0), ConstellationColor.LIGHT_BLUE, 1);
        addButton.setDisable(labels.size() == GraphLabels.MAX_LABELS);
        update();
    });
    final Label addButtonLabel = new Label("Add Label");
    final FlowPane addPane = new FlowPane();
    addPane.setHgap(10);
    addPane.setAlignment(Pos.CENTER_RIGHT);
    addPane.getChildren().addAll(addButtonLabel, addButton);

    final VBox controls = new VBox(10);
    controls.setPrefWidth(400);
    controls.getChildren().addAll(labelsScrollPane, addPane);

    return controls;
}
 
Example 10
Source File: GridRendererSample.java    From chart-fx with Apache License 2.0 4 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final FlowPane root = new FlowPane();
    root.setAlignment(Pos.CENTER);

    final XYChart xyChart1 = new XYChart(new DefaultNumericAxis("x-Axis 1", 0, 100, 10),
            new DefaultNumericAxis("y-Axis 1", 0, 100, 20));
    xyChart1.setPrefSize(600, 300);

    final XYChart xyChart2 = new XYChart(new DefaultNumericAxis("x-Axis 2", 0, 100, 10),
            new DefaultNumericAxis("y-Axis 2", 0, 100, 20));
    xyChart2.setPrefSize(600, 300);
    xyChart2.getGridRenderer().getHorizontalMinorGrid().setVisible(true);
    xyChart2.getGridRenderer().getVerticalMinorGrid().setVisible(true);

    xyChart2.getGridRenderer().getHorizontalMajorGrid().setVisible(false);
    xyChart2.getGridRenderer().getHorizontalMinorGrid().setVisible(true); // implicit major = true
    xyChart2.getGridRenderer().getVerticalMajorGrid().setVisible(true);
    xyChart2.getGridRenderer().getVerticalMinorGrid().setVisible(true);
    //        xyChart2.getGridRenderer().getVerticalMinorGrid().setStyle(".chart-minor-grid-lines{visible:true}");
    //        xyChart2.getGridRenderer().getHorizontalMajorGrid().setStyle("-fx-stroke: blue;-fx-stroke-width:4;");
    //        xyChart2.getGridRenderer().getVerticalMajorGrid().setStyle("-fx-stroke: darkblue");

    final XYChart xyChart3 = new XYChart(new DefaultNumericAxis("x-Axis 3", 0, 100, 10),
            new DefaultNumericAxis("y-Axis 3", 0, 100, 20));
    xyChart3.setPrefSize(600, 300);
    xyChart3.getGridRenderer().getHorizontalMinorGrid().setVisible(true);
    xyChart3.getGridRenderer().getVerticalMinorGrid().setVisible(true);
    xyChart3.getGridRenderer().getHorizontalMajorGrid().setStroke(Color.BLUE);
    xyChart3.getGridRenderer().getVerticalMajorGrid().setStroke(Color.BLUE);
    xyChart3.getGridRenderer().getHorizontalMajorGrid().setStrokeWidth(1);
    xyChart3.getGridRenderer().getVerticalMajorGrid().setStrokeWidth(1);

    final XYChart xyChart4 = new XYChart(new DefaultNumericAxis("x-Axis 4", 0, 100, 10),
            new DefaultNumericAxis("y-Axis 4", 0, 100, 20));
    xyChart4.setPrefSize(600, 300);
    xyChart4.getGridRenderer().getHorizontalMajorGrid().getStrokeDashArray().setAll(Double.valueOf(15),
            Double.valueOf(15));
    xyChart4.getGridRenderer().getVerticalMajorGrid().getStrokeDashArray().setAll(Double.valueOf(5),
            Double.valueOf(5));
    xyChart4.getGridRenderer().getHorizontalMajorGrid().setStrokeWidth(2);
    xyChart4.getGridRenderer().getVerticalMajorGrid().setStrokeWidth(2);

    root.getChildren().addAll(xyChart1, xyChart2, xyChart3, xyChart4);

    final Scene scene = new Scene(root, 1200, 650);
    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(evt -> Platform.exit());
    primaryStage.show();
}
 
Example 11
Source File: ZoomerSample.java    From chart-fx with Apache License 2.0 4 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final FlowPane root = new FlowPane();
    root.setAlignment(Pos.CENTER);

    DataSet testDataSet = generateData();

    Label label = new Label("left-click-hold-drag for zooming. middle-button for panning.\n"
                            + "Tip: drag horizontally/vertically/diagonally for testing; try to select the outlier");
    label.setFont(Font.font(20));
    label.setAlignment(Pos.CENTER);
    label.setContentDisplay(ContentDisplay.CENTER);
    label.setPrefWidth(2.0 * PREF_WIDTH);

    // chart with default zoom
    final Chart chart1 = getTestChart("default zoom", testDataSet);
    Zoomer zoomer1 = new Zoomer();
    registerZoomerChangeListener(zoomer1, chart1.getTitle());
    chart1.getPlugins().add(zoomer1);

    // chart with auto xy zoom
    final Chart chart2 = getTestChart("auto xy zoom", testDataSet);
    final Zoomer zoomer2 = new Zoomer();
    zoomer2.setAutoZoomEnabled(true);
    registerZoomerChangeListener(zoomer2, chart2.getTitle());
    chart2.getPlugins().add(zoomer2);

    // chart with x-only zoom
    final Chart chart3 = getTestChart("x-only zoom", testDataSet);
    Zoomer zoomer3 = new Zoomer(AxisMode.X);
    registerZoomerChangeListener(zoomer3, chart3.getTitle());
    chart3.getPlugins().add(zoomer3);

    // chart with x-only zoom
    final Chart chart4 = getTestChart("y-only zoom", testDataSet);
    Zoomer zoomer4 = new Zoomer(AxisMode.Y);
    registerZoomerChangeListener(zoomer4, chart4.getTitle());
    chart4.getPlugins().add(zoomer4);

    root.getChildren().addAll(chart1, chart2, chart3, chart4, label);

    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(new Scene(root));
    primaryStage.setOnCloseRequest(evt -> Platform.exit());
    primaryStage.show();
}
 
Example 12
Source File: RunChartSamples.java    From chart-fx with Apache License 2.0 4 votes vote down vote up
@Override
public void start(final Stage primaryStage) {
    final BorderPane root = new BorderPane();

    final FlowPane buttons = new FlowPane();
    buttons.setAlignment(Pos.CENTER_LEFT);
    root.setCenter(buttons);
    root.setBottom(makeScreenShot);

    buttons.getChildren().add(new MyButton("AxisRangeScalingSample", new AxisRangeScalingSample()));
    buttons.getChildren().add(new MyButton("CategoryAxisSample", new CategoryAxisSample()));
    buttons.getChildren().add(new MyButton("ChartAnatomySample", new ChartAnatomySample()));
    buttons.getChildren().add(new MyButton("ChartIndicatorSample", new ChartIndicatorSample()));
    buttons.getChildren().add(new MyButton("ChartPerformanceGraph", new ChartPerformanceGraph()));
    buttons.getChildren().add(new MyButton("ContourChartSample", new ContourChartSample()));
    buttons.getChildren().add(new MyButton("CustomColourSchemeSample", new CustomColourSchemeSample()));
    buttons.getChildren().add(new MyButton("CustomFragmentedRendererSample", new CustomFragmentedRendererSample()));
    buttons.getChildren().add(new MyButton("DataViewerSample", new DataViewerSample()));
    buttons.getChildren().add(new MyButton("DimReductionDataSetSample", new DimReductionDataSetSample()));
    buttons.getChildren().add(new MyButton("EditDataSetSample", new EditDataSetSample()));
    buttons.getChildren().add(new MyButton("ErrorDataSetRendererSample", new ErrorDataSetRendererSample()));
    buttons.getChildren()
            .add(new MyButton("ErrorDataSetRendererStylingSample", new ErrorDataSetRendererStylingSample()));
    buttons.getChildren().add(new MyButton("FxmlSample", new FxmlSample()));
    buttons.getChildren().add(new MyButton("GridRendererSample", new GridRendererSample()));
    buttons.getChildren().add(new MyButton("HexagonSamples", new HexagonSamples()));
    buttons.getChildren().add(new MyButton("Histogram2DimSample", new Histogram2DimSample()));
    buttons.getChildren().add(new MyButton("HistogramSample", new HistogramSample()));
    buttons.getChildren().add(new MyButton("HistoryDataSetRendererSample", new HistoryDataSetRendererSample()));
    buttons.getChildren().add(new MyButton("LabelledMarkerSample", new LabelledMarkerSample()));
    buttons.getChildren().add(new MyButton("LogAxisSample", new LogAxisSample()));
    buttons.getChildren().add(new MyButton("MetaDataRendererSample", new MetaDataRendererSample()));
    buttons.getChildren().add(new MyButton("MountainRangeRendererSample", new MountainRangeRendererSample()));
    buttons.getChildren().add(new MyButton("MultipleAxesSample", new MultipleAxesSample()));
    buttons.getChildren().add(new MyButton("NotANumberSample", new NotANumberSample()));
    buttons.getChildren().add(new MyButton("OscilloscopeAxisSample", new OscilloscopeAxisSample()));
    buttons.getChildren().add(new MyButton("PolarPlotSample", new PolarPlotSample()));
    buttons.getChildren().add(new MyButton("RollingBufferSample", new RollingBufferSample()));
    buttons.getChildren().add(new MyButton("RollingBufferSortedTreeSample", new RollingBufferSortedTreeSample()));
    buttons.getChildren().add(new MyButton("ScatterAndBubbleRendererSample", new ScatterAndBubbleRendererSample()));
    buttons.getChildren().add(new MyButton("SimpleChartSample", new SimpleChartSample()));
    buttons.getChildren().add(new MyButton("TimeAxisRangeSample", new TimeAxisRangeSample()));
    buttons.getChildren().add(new MyButton("TimeAxisSample", new TimeAxisSample()));
    buttons.getChildren().add(new MyButton("TransposedDataSetSample", new TransposedDataSetSample()));
    buttons.getChildren().add(new MyButton("ValueIndicatorSample", new ValueIndicatorSample()));
    buttons.getChildren().add(new MyButton("WaterfallPerformanceSample", new WaterfallPerformanceSample()));
    buttons.getChildren().add(new MyButton("WriteDataSetToFileSample", new WriteDataSetToFileSample()));
    buttons.getChildren().add(new MyButton("ZoomerSample", new ZoomerSample()));

    final Scene scene = new Scene(root);

    primaryStage.setTitle(this.getClass().getSimpleName());
    primaryStage.setScene(scene);
    primaryStage.setOnCloseRequest(evt -> Platform.exit());
    primaryStage.show();
}