Examples of Vbox


Examples of javafx.scene.layout.VBox

    final GridPane grid = new GridPane();
    grid.setHgap(10d);
    grid.setVgap(30d);

    final VBox toggleView = new VBox(10d);
    toggleView.getChildren().addAll(emailIcon);

    final GridPane connectionGrid = new GridPane();
    connectionGrid.setPadding(new Insets(20d, 5, 5, 5));
    connectionGrid.setHgap(15d);
    connectionGrid.setVgap(15d);
View Full Code Here

Examples of javafx.scene.layout.VBox

  /**
   * Constructor of DatePicker class
   */
  public DatePicker(){
    super();
    VBox pickerBox = new VBox();
    setId("DatePicker");
    today = Calendar.getInstance();
    // Check whether Sunday is the first day of the week
    isSundayFirstDay = today.getFirstDayOfWeek() == 1 ? true : false;
    month = today.get(Calendar.MONTH);
    year = today.get(Calendar.YEAR);
    dateProperty = new SimpleObjectProperty<Date>((new GregorianCalendar()).getTime());
   
    // First block of the picker pane, which is constructed to show month and year and to change them by decreasing and increasing.
    HBox monthYearRow = new HBox();
    final Label monthYear = new Label(getMonthYear((new GregorianCalendar()).getTime()));
    monthYear.setMinHeight(CELL_HEIGHT * 1.5);
    monthYear.setMinWidth(CELL_WIDTH * 6.0);
    monthYear.setAlignment(Pos.CENTER);
    monthYearRow.getStyleClass().add(DATEPICKER_MONTHYEAR);
    Path decrementArrow = new Path();
    decrementArrow.setId(DATEPICKER_ARROW);
    decrementArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(-ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    decrementArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month--;
        if(month < 0) {
          month = Calendar.DECEMBER;
          year--;
        }
        monthYear.setText(getMonthYear((new GregorianCalendar(year, month, 1)).getTime()));
        setDayCells();
        me.consume();
      }
    });
    Path inreamentArrow = new Path();
    inreamentArrow.setId(DATEPICKER_ARROW);
    inreamentArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    inreamentArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month++;
        if(month > Calendar.DECEMBER) {
          month = Calendar.JANUARY;
          year++;
        }
        monthYear.setText(getMonthYear((new GregorianCalendar(year, month, 1)).getTime()));
        setDayCells();
        me.consume();
      }
    });
    monthYearRow.getChildren().addAll(decrementArrow, monthYear, inreamentArrow);
    monthYearRow.setAlignment(Pos.CENTER);
   
    // Second block of the picker pane, which is constructed to show the first letter of names of days in the week.   
    HBox firstLetterOfDayRow = new HBox();
    firstLetterOfDayRow.getStyleClass().add(DATEPICKER_WEEKDAY);
    String[] weekDays = getFirstLettersOfDays();
    for (int i = 0; i < weekDays.length; i++) {
      Label cell = new Label(weekDays[i]);
      cell.setMinHeight(CELL_HEIGHT);
      cell.setMinWidth(CELL_WIDTH);
      cell.setAlignment(Pos.CENTER);
      firstLetterOfDayRow.getChildren().add(cell);
    }
    pickerBox.getChildren().addAll(monthYearRow, firstLetterOfDayRow);
   
    // Third block of the picker pane, which is constructed to show the days in a ROW_NUMBER by COLUMN_NUMBER matrix.
    // The matrix constitutes of DayCell class which extends Label class and holds date information.
    dayCells = new DayCell[COLUMN_NUMBER * ROW_NUMBER];
    int index = 0;
    for (int i = 0; i < ROW_NUMBER; i++) {
      HBox row = new HBox();
      for (int j = 0; j < COLUMN_NUMBER; j++) {
        DayCell cell = createCell(0, 0, 0);
        row.getChildren().add(cell);
        cell.setId(DATEPICKER_DAYCELL);
        dayCells[index++] = cell;
      }
      pickerBox.getChildren().add(row);
    }
   
    Button todayButton = new Button(RS.rbLabel(KEY.TODAY));
    todayButton.setId(DATEPICKER_TODAYBUTTON);
    todayButton.setOnAction(new EventHandler<ActionEvent>() {
     
      @Override
      public void handle(ActionEvent ae) {
        dateProperty.setValue((new GregorianCalendar(0, 0, 0)).getTime());
        dateProperty.setValue(
            (new GregorianCalendar(
                today.get(Calendar.YEAR),
                today.get(Calendar.MONTH),
                today.get(Calendar.DAY_OF_MONTH))).getTime());
       
      }
    });
   
    HBox todayButtonBox = new HBox();
    todayButtonBox.setId(DATEPICKER_TODAYBUTTONBOX);
    todayButtonBox.setAlignment(Pos.CENTER);
    todayButtonBox.getChildren().add(todayButton);
   
    pickerBox.getChildren().add(todayButtonBox);
   
    getChildren().add(pickerBox);
   
    // Setter of the day cells
    setDayCells();
View Full Code Here

Examples of javafx.scene.layout.VBox

      label.getStyleClass().add("gauge-header");
      // create/add numeric stepper
      numericStepperDigits = new Digits(String.format(
          this.numericStepperFormat, 0), 0.15f, numericStepperColor,
          null);
      final VBox stepperBar = new VBox(NUMERIC_STEPPER_QUARTER_HEIGHT);
      stepperBar.getChildren().addAll(createArrowButton(true),
          createArrowButton(false));

      final Region digitsDisplay = GuiUtil.createBackgroundDisplay(
          new Insets(NUMERIC_STEPPER_EIGHTH_HEIGHT,
              NUMERIC_STEPPER_QUARTER_HEIGHT,
View Full Code Here

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

Examples of javafx.scene.layout.VBox

    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

Examples of javafx.scene.layout.VBox

   *            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

Examples of javafx.scene.layout.VBox

      }
    });
    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

Examples of javafx.scene.layout.VBox

        }
      }
    });
    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

Examples of javafx.scene.layout.VBox

    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

Examples of javafx.scene.layout.VBox

    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
TOP
Copyright © 2018 www.massapi.com. 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.