List of usage examples for javafx.geometry Insets Insets
public Insets(@NamedArg("top") double top, @NamedArg("right") double right, @NamedArg("bottom") double bottom, @NamedArg("left") double left)
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);//from w ww . jav a 2s .c o m tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } tile.setOrientation(Orientation.HORIZONTAL); HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);/* w w w . j ava 2 s.com*/ tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } System.out.println(tile.tileWidthProperty()); HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);//from w ww . j a v a2 s . c o m tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } System.out.println(tile.tileHeightProperty()); HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); TilePane tile = new TilePane(); tile.setHgap(8);// w w w .j a v a2 s .c o m tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("CheckBox")); } System.out.println(tile.tileAlignmentProperty()); HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 600, 400); stage.setScene(scene);//from w w w .j av a 2s. c om stage.setTitle("Slider Sample"); GridPane grid = new GridPane(); grid.setPadding(new Insets(10, 10, 10, 10)); grid.setVgap(10); grid.setHgap(70); scene.setRoot(grid); GridPane.setConstraints(opacityCaption, 0, 1); grid.getChildren().add(opacityCaption); opacityLevel.valueProperty().addListener(new ChangeListener<Number>() { public void changed(ObservableValue<? extends Number> ov, Number old_val, Number new_val) { System.out.println(new_val.doubleValue()); opacityValue.setText(String.format("%.2f", new_val)); } }); GridPane.setConstraints(opacityLevel, 1, 1); grid.getChildren().add(opacityLevel); GridPane.setConstraints(opacityValue, 2, 1); grid.getChildren().add(opacityValue); stage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setTitle("TitledPane"); Scene scene = new Scene(new Group(), 450, 250); scene.setFill(Color.GHOSTWHITE); TilePane tile = new TilePane(Orientation.VERTICAL); tile.setHgap(8);// ww w . j ava 2s.c om tile.setPrefColumns(4); for (int i = 0; i < 20; i++) { tile.getChildren().add(new CheckBox("asdf")); } HBox hbox = new HBox(10); hbox.setPadding(new Insets(20, 0, 0, 20)); hbox.getChildren().setAll(tile); Group root = (Group) scene.getRoot(); root.getChildren().add(hbox); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(); emailComboBox.setItems(list);/*from w w w . ja va 2 s . com*/ emailComboBox.setValue("A"); GridPane grid = new GridPane(); grid.setVgap(4); grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); emailComboBox.setVisibleRowCount(3); GridPane grid = new GridPane(); grid.setVgap(4);//from w w w . ja va 2 s .co m grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getEditor()); GridPane grid = new GridPane(); grid.setVgap(4);//from ww w . j a v a2 s . c o m grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Scene scene = new Scene(new Group(), 450, 250); ObservableList<String> list = FXCollections.observableArrayList("1", "2", "3", "4"); ComboBox<String> emailComboBox = new ComboBox<String>(list); emailComboBox.setValue("A"); System.out.println(emailComboBox.getConverter()); GridPane grid = new GridPane(); grid.setVgap(4);/* w ww . jav a2s . c o m*/ grid.setHgap(10); grid.setPadding(new Insets(5, 5, 5, 5)); grid.add(new Label("To: "), 0, 0); grid.add(emailComboBox, 1, 0); Group root = (Group) scene.getRoot(); root.getChildren().add(grid); stage.setScene(scene); stage.show(); }