@Override public void start(Stage stage) throws Exception { final VBox pane = new VBox(); pane.setSpacing(30); pane.setStyle("-fx-background-color:#EEE; -fx-padding: 40;"); ToggleButton button = new ToggleButton("JavaFx Toggle"); pane.getChildren().add(button); JFXToggleButton toggleButton = new JFXToggleButton(); toggleButton.setText("New Skin"); pane.getChildren().add(toggleButton); JFXToggleNode node = new JFXToggleNode(); final GlyphIcon heartIcon = GlyphsBuilder.create(FontAwesomeIconView.class) .glyph(FontAwesomeIcon.HEART) .build(); heartIcon.setStyle("-fx-padding: 10"); node.setGraphic(heartIcon); pane.getChildren().add(node); final Scene scene = new Scene(pane, 600, 400, Color.valueOf("#EEE")); stage.setTitle("JFX Toggle Button Demo "); scene.getStylesheets() .add(ToggleButtonDemo.class.getResource("/css/jfoenix-components.css").toExternalForm()); stage.setScene(scene); stage.setResizable(false); stage.show(); }
@Override public void start(Stage primaryStage) { final ToggleGroup group = new ToggleGroup(); JFXRadioButton javaRadio = new JFXRadioButton("JavaFX"); javaRadio.setPadding(new Insets(10)); javaRadio.setToggleGroup(group); JFXRadioButton jfxRadio = new JFXRadioButton("JFoenix"); jfxRadio.setPadding(new Insets(10)); jfxRadio.setToggleGroup(group); VBox vbox = new VBox(); vbox.getChildren().add(javaRadio); vbox.getChildren().add(jfxRadio); vbox.setSpacing(10); HBox hbox = new HBox(); hbox.getChildren().add(vbox); hbox.setSpacing(50); hbox.setPadding(new Insets(40, 10, 10, 120)); Scene scene = new Scene(hbox); primaryStage.setScene(scene); primaryStage.setWidth(500); primaryStage.setHeight(400); primaryStage.setTitle("JFX RadioButton Demo "); scene.getStylesheets() .add(RadioButtonDemo.class.getResource("/css/jfoenix-components.css").toExternalForm()); primaryStage.show(); }
box.getChildren().add(pane); box.getChildren().add(listsPane); box.setSpacing(40);
main.setSpacing(50);
@Override public void start(Stage stage) { JFXSlider horLeftSlider = new JFXSlider(); horLeftSlider.setMinWidth(500); JFXSlider horRightSlider = new JFXSlider(); horRightSlider.setMinWidth(500); horRightSlider.setIndicatorPosition(IndicatorPosition.RIGHT); JFXSlider verLeftSlider = new JFXSlider(); verLeftSlider.setMinHeight(500); verLeftSlider.setOrientation(Orientation.VERTICAL); JFXSlider verRightSlider = new JFXSlider(); verRightSlider.setMinHeight(500); verRightSlider.setOrientation(Orientation.VERTICAL); verRightSlider.setIndicatorPosition(IndicatorPosition.RIGHT); HBox hbox = new HBox(); hbox.setSpacing(450); hbox.getChildren().addAll(verRightSlider, verLeftSlider); VBox vbox = new VBox(); vbox.getChildren().addAll(horRightSlider, horLeftSlider, hbox); vbox.setSpacing(100); vbox.setPadding(new Insets(100, 50, 50, 150)); Scene scene = new Scene(new Group()); ((Group) scene.getRoot()).getChildren().add(vbox); scene.getStylesheets().add(SliderDemo.class.getResource("/css/jfoenix-components.css").toExternalForm()); stage.setScene(scene); stage.setWidth(900); stage.setHeight(900); stage.show(); stage.setTitle("JFX Slider Demo"); }
pane.setSpacing(30); pane.setStyle("-fx-background-color:WHITE;-fx-padding:40;");
vbox.setSpacing(5); vbox.setPadding(new Insets(10, 0, 0, 10)); vbox.getChildren().addAll(label, table);
@Override protected Node createUndecoratedEditor() { final VBox container = new VBox(); final ListView<String> listView = new ListView<>(strings); listView.setCellFactory(view -> new EnumCell(strings)); listView.setEditable(true); listView.setMaxHeight(USE_PREF_SIZE); listView.setPrefHeight(LIST_HEIGHT); final HBox controls = new HBox(SPACING); controls.setAlignment(Pos.CENTER); controls.getChildren().addAll( addButton(listView), removeButton(listView), populateButton(listView) ); container.setSpacing(SPACING); container.getChildren().addAll(listView, controls); hideShowBehaviour(container); return container; }
vbox.setSpacing(5); vbox.setPadding(new Insets(10, 10, 10, 10)); vbox.getChildren().addAll(label, table, actionTaken);
pane.setSpacing(30); pane.setStyle("-fx-background-color:WHITE");
/** * * @param value * @return */ public VBox withSpacing(double value) { super.setSpacing(value); return this; }
public DefaultSimpleDialog(int spacing) { this(false); box.setSpacing(spacing); }
@Nonnull public static VBox vbox(@px int spacing, @Nonnull Pos alignment, @Nonnull Node... nodes) { VBox vBox = new VBox(nodes); vBox.setSpacing(spacing); vBox.setAlignment(alignment); return vBox; }
private Node addTitle(Node node, String title){ VBox vBox = new VBox(); vBox.setSpacing(3); Label label = new Label(title); label.getStyleClass().add("titleLabel"); vBox.getChildren().add(label); VBox.setVgrow(node, Priority.ALWAYS); vBox.getChildren().add(node); return vBox; } public void updateMergeDiff(MergeDiffInfo<?> mergeDiff) {
/** * Generates a vbox with border radius corner and white background. */ public static VBox vboxContainer(boolean hgrow, boolean vgrow) { final VBox container = new VBox(); container.setSpacing(10); container.getStyleClass().add(ROWS_CONTAINER_CSS); if (hgrow) { setHgrow(container); } if (vgrow) { setVgrow(container); } return container; }
@Override public void start(Stage primaryStage) throws Exception{ method(); } private void method(){ StackPane stack = new StackPane(); Scene scene = new Scene(stack, 400, 400); Beginning.setScene(scene); Beginning.setTitle("Start here"); VBox rows = new VBox(); rows.setAlignment(Pos.CENTER); rows.setSpacing(50); stack.getChildren().add(rows); // and so one }
VBox vb = new VBox(); vb.getChildren().addAll(tuitionreport,totStudents,totalFees); vb.setSpacing(10); VBox vbez = new VBox(); vbez.getChildren().addAll(vb,instructors,hboxtitle); for(int m=0;m<test.length;m++) { HBox hb = new HBox(); System.out.println("Test.length's size : " + test.length); System.out.println("TeacherLabels's count : " + teacherlabels.size()); hb.getChildren().addAll(teacherlabels.get(m),eachlecturertotstudents.get(m),subincome.get(m),teacherpayments.get(m)); hb.setSpacing(10); vbez.getChildren().add(hb); } vbez.getChildren().addAll(linez,allpaymenta,tuitionincomea); this.setScene(new Scene(vbez, 2000, 2000)); this.show();
private StackPane createMasker(MaskerPane maskerPane) { VBox vBox = new VBox(); vBox.setAlignment(Pos.CENTER); vBox.setSpacing(10.0); vBox.getStyleClass().add("masker-center"); //$NON-NLS-1$ vBox.getChildren().add(createLabel()); vBox.getChildren().add(createProgressIndicator()); HBox hBox = new HBox(); hBox.setAlignment(Pos.CENTER); hBox.getChildren().addAll(vBox); StackPane glass = new StackPane(); glass.setAlignment(Pos.CENTER); glass.getStyleClass().add("masker-glass"); //$NON-NLS-1$ glass.getChildren().add(hBox); return glass; }
public Node getContent() { final VBox box = new VBox(); VBox.setVgrow(box, Priority.ALWAYS); box.setSpacing(25); if (content == null) { box.getChildren().addAll(toolbar, new HBox()); } else { box.getChildren().addAll(toolbar, content); VBox.setVgrow(content, Priority.ALWAYS); } return box; }