List of usage examples for javafx.scene.layout StackPane getChildren
@Override
public ObservableList<Node> getChildren()
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());/*from w ww . j a v a2 s .c om*/ pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); System.out.println(pieChart.getStartAngle()); }
From source file:Main.java
@Override public void start(Stage primaryStage) { ObservableList<String> names = FXCollections.observableArrayList(); ObservableList<String> data = FXCollections.observableArrayList(); ListView<String> listView = new ListView<String>(data); listView.setPrefSize(200, 250);//w ww.ja va 2s . c o m listView.setEditable(true); names.addAll("A", "B", "C", "D", "E"); data.add("Double Click to Select Value"); listView.setItems(data); listView.setCellFactory(ComboBoxListCell.forListView(names)); StackPane root = new StackPane(); root.getChildren().add(listView); primaryStage.setScene(new Scene(root, 200, 250)); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());/*w w w . j a v a2 s . c o m*/ pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); pieChart.setLabelLineLength(8); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());//from w ww. j a va2 s. c o m pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); System.out.println(pieChart.labelsVisibleProperty()); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Button btn = new Button(); btn.setText("Say 'Hello World'"); btn.setOnAction(new EventHandler<ActionEvent>() { @Override//from www .ja va2 s . c o m public void handle(ActionEvent event) { System.out.println("Hello World!"); } }); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());/*from w w w . j a va 2 s. c o m*/ pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); pieChart.setLabelsVisible(true); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());/*from ww w .j a v a2 s . com*/ pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); pieChart.requestLayout(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { PieChart pieChart = new PieChart(); pieChart.setData(getChartData());//from w w w .j a v a 2 s . c o m pieChart.setTitle("Title"); pieChart.setLegendSide(Side.LEFT); pieChart.setClockwise(false); pieChart.setLabelsVisible(false); StackPane root = new StackPane(); root.getChildren().add(pieChart); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); System.out.println(pieChart.isClockwise()); }
From source file:Main.java
@Override public void start(Stage primaryStage) { CheckBoxTreeItem<String> rootItem = new CheckBoxTreeItem<>("A"); rootItem.setExpanded(true);/*from ww w . j a v a 2s . co m*/ TreeView tree = new TreeView(rootItem); tree.setEditable(true); tree.setCellFactory(CheckBoxTreeCell.forTreeView()); CheckBoxTreeItem<String> checkBoxTreeItem = new CheckBoxTreeItem<>("a"); rootItem.getChildren().add(checkBoxTreeItem); checkBoxTreeItem = new CheckBoxTreeItem<>("b"); rootItem.getChildren().add(checkBoxTreeItem); tree.setRoot(rootItem); StackPane root = new StackPane(); root.getChildren().add(tree); primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { CategoryAxis xAxis = new CategoryAxis(); NumberAxis yAxis = new NumberAxis(); AreaChart areaChart = new AreaChart(xAxis, yAxis, getChartData()); areaChart.setTitle("speculations"); primaryStage.setTitle("AreaChart example"); StackPane root = new StackPane(); root.getChildren().add(areaChart); primaryStage.setScene(new Scene(root, 400, 250)); primaryStage.show();// w w w .j av a2s . co m }