List of usage examples for javafx.scene Group Group
public Group()
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); Arc arc = new Arc(); arc.setCenterX(50.0f);//from w ww. j a v a 2s . c om arc.setCenterY(50.0f); arc.setRadiusX(25.0f); arc.setRadiusY(25.0f); arc.setStartAngle(45.0f); arc.setLength(270.0f); arc.setType(ArcType.ROUND); System.out.println(arc.typeProperty().getName()); g.getChildren().add(arc); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); Arc arc = new Arc(); arc.setCenterX(50.0f);/*from w ww . j ava 2 s . c om*/ arc.setCenterY(50.0f); arc.setRadiusX(25.0f); arc.setRadiusY(25.0f); arc.setStartAngle(45.0f); arc.setLength(270.0f); arc.setType(ArcType.ROUND); System.out.println(arc.radiusXProperty().doubleValue()); g.getChildren().add(arc); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); Arc arc = new Arc(); arc.setCenterX(50.0f);/*from w ww .j a v a2 s.c om*/ arc.setCenterY(50.0f); arc.setRadiusX(25.0f); arc.setRadiusY(25.0f); arc.setStartAngle(45.0f); arc.setLength(270.0f); arc.setType(ArcType.ROUND); System.out.println(arc.getRadiusX()); g.getChildren().add(arc); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); Arc arc = new Arc(); arc.setCenterX(50.0f);// w w w .j av a2s. c o m arc.setCenterY(50.0f); arc.setRadiusX(25.0f); arc.setRadiusY(25.0f); arc.setStartAngle(45.0f); arc.setLength(270.0f); arc.setType(ArcType.ROUND); System.out.println(arc.getRadiusY()); g.getChildren().add(arc); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Text Fonts"); Group g = new Group(); Scene scene = new Scene(g, 550, 250, Color.web("0x0000FF", 1.0)); Arc arc = new Arc(); arc.setCenterX(50.0f);//from w w w. j a v a 2s . c o m arc.setCenterY(50.0f); arc.setRadiusX(25.0f); arc.setRadiusY(25.0f); arc.setStartAngle(45.0f); arc.setLength(270.0f); arc.setType(ArcType.ROUND); System.out.println(arc.getLength()); g.getChildren().add(arc); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(final Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 400, 300, Color.WHITE); GridPane gridpane = new GridPane(); ComboBox<Rectangle> cmb = new ComboBox<Rectangle>(); cmb.getItems().addAll(new Rectangle(10, 10, Color.RED), new Rectangle(10, 10, Color.GREEN), new Rectangle(10, 10, Color.BLUE)); gridpane.add(cmb, 2, 0);/*from www. j a v a 2 s.co m*/ root.getChildren().add(gridpane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);//from w w w .j a v a 2 s .c o m stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); path.getElements().add(new VLineTo(50.0f)); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group()); stage.setWidth(300);//from w w w . ja va 2 s . c om stage.setHeight(150); ToolBar toolBar = new ToolBar(); toolBar.getItems().add(new Button("New")); toolBar.getItems().add(new Button("Open")); toolBar.getItems().add(new Button("Save")); toolBar.getItems().add(new Separator()); toolBar.getItems().add(new Button("Clean")); toolBar.getItems().add(new Button("Compile")); toolBar.getItems().add(new Button("Run")); toolBar.getItems().add(new Separator()); toolBar.getItems().add(new Button("Debug")); toolBar.getItems().add(new Button("Profile")); toolBar.setOrientation(Orientation.HORIZONTAL); System.out.println(toolBar.orientationProperty()); ((Group) scene.getRoot()).getChildren().add(toolBar); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle(""); Group root = new Group(); Scene scene = new Scene(root, 300, 250, Color.WHITE); Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0);/*from w w w .j a v a2 s . com*/ ds.setColor(Color.color(0.4, 0.4, 0.4)); Ellipse ellipse = new Ellipse(); ellipse.setCenterX(50.0f); ellipse.setCenterY(50.0f); ellipse.setRadiusX(50.0f); ellipse.setRadiusY(25.0f); ellipse.setEffect(ds); g.getChildren().add(ellipse); root.getChildren().add(g); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);//from w w w . j av a 2 s. c o m stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); final ImageView selectedImage = new ImageView(); Image image1 = new Image(Main.class.getResourceAsStream("a.jpg")); selectedImage.setImage(image1); selectedImage.setRotate(90); root.getChildren().addAll(selectedImage); scene.setRoot(root); stage.setScene(scene); stage.show(); }