@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(); }
@Override protected Node createUndecoratedEditor() { final CheckBox cbNull = new CheckBox(); final Node wrappedCb = ItemUtil.lockDecorator(cbNull, document, ItemUtil.DATABASE_RELATION_TOOLTIP); final Label label = new Label(IMPLEMENTATION_TITLE); final ChoiceBox<ImplementAs> cbImpl = new ChoiceBox<>( observableArrayList(ImplementAs.values()) ); cbImpl.setTooltip(new Tooltip(IMPLEMENTATION_TOOLTIP)); final HBox right = new HBox(label, cbImpl); final HBox left = new HBox(wrappedCb, right); left.setSpacing(16); right.setSpacing(8); right.setAlignment(Pos.CENTER); cbNull.selectedProperty().bindBidirectional(nullable); cbImpl.valueProperty().bindBidirectional(implementation); right.visibleProperty().bind(nullable); right.disableProperty().bind(nullable.not()); return left; }
hbox.setSpacing(50); hbox.setAlignment(Pos.CENTER); hbox.setStyle("-fx-padding:20");
@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"); }
errorContainer.setSpacing(10); errorContainer.setVisible(false); errorContainer.setOpacity(0);
final HBox container = new HBox(new JFXButton("INFO"), button2); container.setAlignment(Pos.CENTER_RIGHT); container.setSpacing(12); nodesList.addAnimatedNode(container, (expanded, duration) -> { List<KeyFrame> frames = new ArrayList<>();
/** * * @param value * @return */ public HBox withSpacing(double value) { super.setSpacing(value); return this; }
hb.setSpacing(5); hb.setAlignment(Pos.CENTER); hb.getChildren().addAll(pane, pi);
hBox.setSpacing(5.0); hBox.setPadding(new Insets(5, 5, 5, 5)); hBox.getChildren().add(lblTool);
HBox buttons = new HBox(); buttons.setAlignment( Pos.CENTER ); buttons.setSpacing( 10 ); buttons.getChildren().addAll( yesButton, noButton ); bp.setCenter( buttons );
/** * Constructor */ public MultiSelectionListFormItemPresenter() { currentValuesPresenter = new HBox(); currentValuesPresenter.setSpacing(4); currentValuesPresenter.setAlignment(Pos.CENTER); }
HBox HB = new HBox(); HB.getChildren().addAll(btnexample1, btnexample2); GridPane.setHalignment(HB, HPos.LEFT); HB.setSpacing(5); grid.add(HB, 0, 8);
HBox box = new HBox(); CheckBox cb = new CheckBox(); Label text = new Label("Show on Startup"); box.getChildren().addAll(text, cb); box.setSpacing(5);
@Nonnull public static HBox hbox(@px int spacing, @Nonnull Collection<? extends Node> nodes) { HBox hBox = new HBox(); hBox.getChildren().addAll(nodes); hBox.setSpacing(spacing); hBox.setAlignment(Pos.CENTER_LEFT); return hBox; }
public HBox addHBox(URL url) { HBox hbox = new HBox(); hbox.setPadding(new Insets(15, 12, 15, 12)); hbox.setSpacing(10); hbox.setStyle("-fx-background-color: #336699;"); hbox.setAlignment(Pos.TOP_CENTER); Image photo = new Image(url, 300, 300, false, false); ImageView myView = new ImageView(photo); hbox.getChildren().add(myView); return hbox; }
@Override public void start(Stage stage) { HBox pane = new HBox(clock1, clock2); pane.setSpacing(20); Scene scene = new Scene(pane); stage.setTitle("Medusa Clock Control"); stage.setScene(scene); stage.show(); // Calculate number of nodes calcNoOfNodes(pane); System.out.println(noOfNodes + " Nodes in SceneGraph"); }
private Node createLegendEntry(String text, Color color) { HBox hbox = new HBox(); hbox.setAlignment(Pos.CENTER_LEFT); hbox.setSpacing(3); hbox.getChildren().add(new Rectangle(15, 15, color)); hbox.getChildren().add(new Label(text)); VBox.setMargin(hbox, new Insets(1.5, 3, 1.5, 3)); return hbox; }
private HBox createDescriptionVale(String description, Node value){ final HBox result = new HBox(); result.setAlignment(Pos.CENTER_LEFT); result.setSpacing(3); final Label label = new Label(description); label.setMinWidth(50); HBox.setHgrow(label, Priority.NEVER); result.getChildren().add(label); result.getChildren().add(value); HBox.setHgrow(value, Priority.ALWAYS); return result; }
@Override public Node createContent() { HBox pane = new HBox(); pane.setAlignment(Pos.CENTER_LEFT); pane.setSpacing(3); final ChoiceBox<ProcessingEngineInfo> engineChoicebox = createEngineChoicebox(); final ChoiceBox<ProcessorPoolInfo> poolChoicebox = createPoolChoicebox(); pane.getChildren().add(new Label("Engine")); pane.getChildren().add(engineChoicebox); pane.getChildren().add(new Label("Pool")); pane.getChildren().add(poolChoicebox); engineChoicebox.getSelectionModel().selectFirst(); return pane; }
public InternalTab(final String title) { this.title.set(title); getStyleClass().setAll("InternalTab-primary"); toolbar.setStyle("-fx-background-color: white; " + "-fx-border-color: #e5e5e5; " + "-fx-border-width: 0 0 1 0;" + "-fx-padding: 15 5 8 5;"); toolbar.setSpacing(10); toolbar.setPrefHeight(25); toolbar.setVisible(false); toolbar.setManaged(false); setStyle("-fx-min-width: 100;" + "-fx-padding: 0 10 0 10"); }