Package javafx.scene.layout

Examples of javafx.scene.layout.VBox


              notifyFadeTrans.play();
            }
          }
        }
      });
      final VBox root = new VBox(0);
      VBox.setMargin(btn, Insets.EMPTY);
      root.getChildren().add(btn);
      notifyPopup.setScene(new Scene(root, NOTIFY_WINDOW_WIDTH,
          NOTIFY_WINDOW_HEIGHT, Color.TRANSPARENT));
      notifyPopup.getScene().getStylesheets().add(RS.path(RS.CSS_MAIN));
      positionNotification();
      notifyPopup.show();
View Full Code Here


    mailConnectionView = new EmailHostConnection(controlBar);

    connectionView.setId("connection-view");
    connectionView.getChildren().addAll(wirelessConnectionView, createSeparator(Orientation.VERTICAL), mailConnectionView);

    final VBox bottom = new VBox();
    bottom.setId("bottom-view");
    bottom.getChildren().addAll(taskbar, new RemoteNodes(controlBar, Orientation.HORIZONTAL));

    content.setCenter(centerView);
    content.setBottom(bottom);
    content.setTop(controlBar);
   
View Full Code Here

   *            the {@linkplain Node}s that will appear adjacent to the
   *            {@linkplain StatusIcon}
   * @return the {@linkplain GridPane}
   */
  protected GridPane createIconGrid(final StatusIcon icon, final Node... nodes) {
      final VBox iconNodes = new VBox(10d);
      iconNodes.setPadding(new Insets(30d, 0, 0, 0));
      iconNodes.getChildren().addAll(nodes);
     
      final GridPane iconGrid = new GridPane();
      //iconGrid.setPadding(new Insets(20d, 0, 0, 0));
    iconGrid.setHgap(5d);
    iconGrid.setVgap(15d);
View Full Code Here

      }
    });
    pBox.autosize();
    ToolBar toolBar = new ToolBar();
    toolBar.getItems().add(pBox);
    VBox personBox = new VBox(10);
    personBox.setPadding(new Insets(10, 10, 10, 50));
    VBox beanPane = new VBox(10);
    beanPane.setPadding(new Insets(10, 10, 10, 10));
    final Text title = new Text(
        "Person POJO using auto-generated JavaFX properties. "
            + "Duplicate field controls exist to demo multiple control binding");
    title.setWrappingWidth(400d);
    HBox hobbyBox = beanTF("allHobbies", "hobbies", "name", Hobby.class, 0,
        ListView.class, null, HOBBY_OVERWRITE);
    HBox langBox = beanTF("allLanguages", "languages", null, String.class,
        0, ListView.class, null, shouldNeverAppear);
    final HBox stBox = beanTF("address.location.state", null, null, null,
        2, ComboBox.class, "[a-zA-z]", STATES);
    personBox.getChildren().addAll(
        beanTF("name", null, null, null, 50, null, "[a-zA-z0-9\\s]*"),
        beanTF("age", null, null, null, 100, Slider.class, null),
        beanTF("age", null, null, null, 100, null, "[0-9]"),
        beanTF("password", null, null, null, 100, PasswordField.class,
            "[a-zA-z0-9]"),
        beanTF("address.street", null, null, null, 50, null,
            "[a-zA-z0-9\\s]*"),
        stBox,
        beanTF("address.location.country", null, null, null, 10, null,
            "[0-9]"),
        beanTF("address.location.country", null, null, null, 2,
            ComboBox.class, "[0-9]", new Integer[] { 0, 1, 2, 3 }),
        beanTF("address.location.international", null, null, null, 0,
            CheckBox.class, null), langBox, hobbyBox);
    beanPane.getChildren().addAll(title, personBox);
    personBox.getChildren().add(createRoleField("role"));
    // JFXtras SimpleCalendar test
    SimpleCalendar sc = new SimpleCalendar();
    personPA.bindBidirectional("dob", sc.dateProperty(), Date.class);
    personBox.getChildren().add(sc);
    // CalendarPicker lCalendarPicker = new CalendarPicker();
    // personPA.bindBidirectional("dob", lCalendarPicker.calendarProperty(),
    // Calendar.class);
    // lCalendarPicker.calendarProperty().addListener(new
    // ChangeListener<Calendar>() {
    // @Override
    // public void changed(ObservableValue<? extends Calendar> observable,
    // Calendar oldValue, Calendar newValue) {
    // dumpPojo(personPA);
    // }
    // });
    // personBox.getChildren().add(lCalendarPicker);

    final TextField pojoNameTF = new TextField();
    Button pojoNameBtn = new Button("Set Person's Name");
    pojoNameBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
        personPA.getBean().setName(pojoNameTF.getText());
        dumpPojo(null, null, personPA);
      }
    });
    VBox pojoBox = new VBox(10);
    pojoBox.setPadding(new Insets(10, 10, 10, 10));
    Text lbl = new Text("Set selected person's field data via POJO "
        + "with unbound controls (not working because without "
        + "dependency injection instrumentation, java agent, or "
        + "byte-code manipulation this is not currently possible- "
        + "maybe a JavaFX life-cycle listener would work?):");
    lbl.setWrappingWidth(300d);
    pojoBox.getChildren().addAll(lbl, new Label("Name:"), pojoNameTF,
        pojoNameBtn, new Separator(),
        updateListView(langBox, "Language"),
        updateListView(hobbyBox, "Hobby"), new Separator(),
        new Label("POJO Dump:"), pojoTA);
    SplitPane pojoSplit = new SplitPane();
    pojoSplit.getItems().addAll(beanPane, pojoBox);
    VBox beanBox = new VBox(10);
    beanBox.getChildren().addAll(toolBar, pojoSplit);
    return beanBox;
  }
View Full Code Here

        }
      }
    });
    HBox btnBox = new HBox();
    btnBox.getChildren().addAll(addBtn, remBtn, remSelBtn);
    VBox box = new VBox();
    box.getChildren().addAll(addRemTF, btnBox);
    return box;
  }
View Full Code Here

    FormulaFrame.add(root);
   
     HBox hbox = new HBox(50);
     hbox.setAlignment(Pos.CENTER);
   
          VBox vbox1 = new VBox();
          vbox1.setAlignment(Pos.BOTTOM_CENTER);
          vbox1.setStyle("-fx-border-style: solid;"
                  + "-fx-border-width: 1;"
                  + "-fx-border-color: black");
         
          VBox vbox2 = new VBox(10);
          vbox2.setAlignment(Pos.CENTER);
          vbox2.setStyle("-fx-border-style: solid;"
                  + "-fx-border-width: 1;"
                  + "-fx-border-color: black");
         
          VBox vbox3 = new VBox(20);
          vbox3.setAlignment(Pos.TOP_CENTER);
          vbox3.setStyle("-fx-border-style: solid;"
                  + "-fx-border-width: 1;"
                  + "-fx-border-color: black");
     for (int i = 0; i < 5; i++)
          {
              Button bt = new Button("Button " + (i+1));
              Button bt2 = new Button("Button " + (i+1)); // unfortunately thereĀ“s no "clone" or "copy" method
              Button bt3 = new Button("Button " + (i+1));
              Pane hb = new Pane();
              HBox hb1 = new HBox();
              hb1.getChildren().add(bt2);
              hb.getChildren().add(hb1);
              vbox1.getChildren().add(bt);
              vbox2.getChildren().add(hb);
              vbox3.getChildren().add(bt3);
          }
     hbox.getChildren().addAll(vbox1, vbox2, vbox3);
    
    VBox box = new VBox();
    pane.setStyle("-fx-border-color: red;");
    box.setStyle("-fx-border-color: blue;");
    box.getChildren().addAll(FormulaFrame.ff, hbox);
    Cursor.prompt.setHeight(100);
    box.setPrefSize(100, 100);
    //StackPane.setMargin(box, new Insets(24));
    //pane.getChildren().addAll(box, Cursor.prompt);
    pane.setCenter(box);
    pane.setRight(Cursor.prompt);
    Cursor.prompt.setX(200);
View Full Code Here

    private void createViews() {
        this.applicationsView = new ApplicationsView();
        this.vertical = new SplitPane();
        this.vertical.setOrientation(Orientation.VERTICAL);
        HBox threadsAndMemory = new HBox();
        VBox paranormal = new VBox();
        HBox paranormalContent = new HBox();
        HBox transactions = new HBox();
        HBox web = new HBox();
        HBox performance = new HBox();

        String hBoxClass = "boxSpacing";
        this.vertical.getStyleClass().add(hBoxClass);
        threadsAndMemory.getStyleClass().add(hBoxClass);
        paranormalContent.getStyleClass().add(hBoxClass);
        transactions.getStyleClass().add(hBoxClass);
        web.getStyleClass().add(hBoxClass);

        instantiateViews();

        threadsAndMemory.getChildren().addAll(this.heap.view(), this.threadCount.view(), this.peakThreadCount.view());
        transactions.getChildren().addAll(this.commitCount.view(), this.rollbackCount.view());
        paranormalContent.getChildren().addAll(this.queuedConnections.view(), this.totalErrors.view(), this.busyThread.view());
        paranormal.getChildren().addAll(paranormalContent,this.status.view());
        performance.getChildren().addAll(this.successfulTXPerf.view());
        performance.getChildren().addAll(this.failedTXPerf.view());
        web.getChildren().addAll(this.activeSessions.view());
        web.getChildren().addAll(this.expiredSessions.view());
        Tab threadsAndMemoryTab = createTab(threadsAndMemory, "Threads And Memory");
View Full Code Here

            super(getMessage("exception.dialog.title"));

            initModality(Modality.APPLICATION_MODAL);
           
            // --- initComponents
            VBox contentPanel = new VBox();
            contentPanel.getStyleClass().add("more-info-dialog");

            contentPanel.setPrefSize(800, 600);

            if (throwable != null) {
                BorderPane labelPanel = new BorderPane();

                Label label = new Label(getString("exception.dialog.label"));
                labelPanel.setLeft(label);

                contentPanel.getChildren().add(labelPanel);

                StringWriter sw = new StringWriter();
                PrintWriter pw = new PrintWriter(sw);
                throwable.printStackTrace(pw);
                TextArea text = new TextArea(sw.toString());
                text.setEditable(false);
                text.setWrapText(true);
                text.setPrefWidth(60 * 8);
                text.setPrefHeight(20 * 12);

                VBox.setVgrow(text, Priority.ALWAYS);
                contentPanel.getChildren().add(text);
            }
           
            // --- getBtnPanel
            // This panel contains right-aligned "Close" button.  It should
            // dismiss the dialog and dispose of it.
            HBox btnPanel = new HBox();
            btnPanel.getStyleClass().add("button-panel");

            Button dismissBtn = new Button(getMessage("common.close.btn"));
            dismissBtn.setPrefWidth(80);
            dismissBtn.setOnAction(new EventHandler<ActionEvent>() {
                @Override public void handle(ActionEvent e) {
                    hide();
                }
            });

            dismissBtn.setDefaultButton(true);
            btnPanel.getChildren().add(dismissBtn);
            contentPanel.getChildren().add(btnPanel);
            // --- getBtnPanel

            setContentPane(contentPanel);
            // --- initComponents
        }
View Full Code Here

        backShadow.setStyle("-fx-background-color: "+CSSHelper.toCssColor(backColor)+";");
        target.getChildren().add(backShadow);
       
        String blackOrWhiteDependingFromBack ="ladder("+CSSHelper.toCssColor(backColor)+", white 49%, black 50%);";
       
        final VBox back = new VBox(3);
        StackPane.setMargin(back, new Insets(150));
        back.setStyle("-fx-border-color: "+blackOrWhiteDependingFromBack +"; -fx-border-width: 1px; -fx-padding: 3; -fx-background-color: derive("+CSSHelper.toCssColor(backColor)+",-50%);");
        back.setAlignment(Pos.CENTER_RIGHT);
        final Label label = new Label(message);
        label.prefWidthProperty().bind(target.widthProperty());
        StackPane.setMargin(back, new Insets(150));
        label.setStyle("-fx-text-fill: "+blackOrWhiteDependingFromBack +";");
        label.setWrapText(true);
        label.setGraphic(icon);
        back.getChildren().add(label);
       
        final TextArea area = new TextArea();
        area.setPrefRowCount(10);
        if (e!=null){
          area.setText(Throwables.getStackTraceAsString(e));
        }
        area.setOpacity(0.4);
        area.setEditable(false);
        VBox.setVgrow(area, Priority.ALWAYS);
        back.getChildren().add(area);
        area.getStyleClass().add("consoleFont");
       
        ContextMenu menue = new ContextMenu();
        MenuItem item = new MenuItem("copy to clipboard");
        item.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            final Clipboard clipboard = Clipboard.getSystemClipboard();
              final ClipboardContent content = new ClipboardContent();
              content.putString(area.getText());
              clipboard.setContent(content);
          }
        });
        menue.getItems().add(item);
        area.setContextMenu(menue);
       
        Button ok = new Button("OK");
        ok.setPrefWidth(100);
        ok.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            target.getChildren().remove(back);
            target.getChildren().remove(backShadow);
            if (okOnAction!=null){
              okOnAction.run();
            }
          }
        });
        back.getChildren().add(ok);
       
        target.getChildren().add(back);
      }
    });
  }
View Full Code Here

         **************************************************************************/   

        DialogTemplate(Stage owner, String title, String masthead, DialogOptions options) {
            this.dialog = new FXDialog(title, owner, true);

            this.contentPane = new VBox();
            this.dialog.setContentPane(contentPane);

            this.mastheadString = masthead;
            this.options = options;
        }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.VBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.