private Label createNoMatchingUsersLabel() {
   Label noMatchingUsersLabel = new Label(MESSAGE_NO_MATCHES);
   noMatchingUsersLabel.setPrefHeight(40);
   noMatchingUsersLabel.setPrefWidth(398);
   noMatchingUsersLabel.setAlignment(Pos.CENTER);
   return noMatchingUsersLabel;
 }
 private Label createNoExistingAssigneeLabel() {
   Label noExistingAssignee = new Label(MESSAGE_NO_ASSIGNEE);
   noExistingAssignee.setPrefHeight(40);
   FontLoader fontLoader = Toolkit.getToolkit().getFontLoader();
   double width =
       fontLoader.computeStringWidth(noExistingAssignee.getText(), noExistingAssignee.getFont());
   noExistingAssignee.setPrefWidth(width);
   return noExistingAssignee;
 }
예제 #3
0
  public static Tuple2<Label, VBox> getTradeInputBox(HBox amountValueBox, String descriptionText) {
    Label descriptionLabel = new Label(descriptionText);
    descriptionLabel.setId("input-description-label");
    descriptionLabel.setPrefWidth(170);

    VBox box = new VBox();
    box.setSpacing(4);
    box.getChildren().addAll(descriptionLabel, amountValueBox);
    return new Tuple2<>(descriptionLabel, box);
  }
예제 #4
0
    public FileGridCell() {
      Label titleLabel = new Label();
      titleLabel.setPrefWidth(80);
      titleLabel.setWrapText(true);
      titleLabel.setTextAlignment(TextAlignment.CENTER);
      title = titleLabel.textProperty();

      ImageView iconView = new ImageView();
      icon = iconView.imageProperty();

      VBox vbox = new VBox(iconView, titleLabel);
      vbox.setAlignment(Pos.TOP_CENTER);

      setGraphic(vbox);
    }