Package javafx.geometry

Examples of javafx.geometry.Insets


   *            {@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);
View Full Code Here


    final HBox dateBox = new HBox();
    dateBox.setAlignment(Pos.BOTTOM_RIGHT);
    dateBox.getChildren().addAll(dateField, simpleCalender);

    setPadding(new Insets(10d));
    setAlignment(Pos.BOTTOM_RIGHT);
    getChildren().addAll(chart, dateBox);

    sonarSeries.setName(RS.rbLabel(KEY.LABEL_GRAPH_SERIES_ALARM_SONAR));
    pirSeries.setName(RS.rbLabel(KEY.LABEL_GRAPH_SERIES_ALARM_PIR));
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?):");
View Full Code Here

  // private static Robot robot;

  public Leaf(String value) {
    display.setFocusTraversable(true);
    leaf.setAlignment(Pos.CENTER);
    leaf.setPadding(new Insets(0, SPACE, 0, SPACE));
//    leaf.setStyle("-fx-border-color: red;");
//    display.getStyleClass().setAll("display");
//    input.getStyleClass().setAll("input");
    input.setPrefWidth(100);
    display.setText(value);
View Full Code Here

  private Text open = new Text("(");
  private Text close = new Text(")");

  public VComposite() {
    super();
    vbox.setPadding(new Insets(SPACE, 0, SPACE, 0));
    vbox.setSpacing(SPACE);
    vbox.setAlignment(Pos.CENTER);
    // vbox.setStyle("-fx-border-color: yellowgreen;");
    vbox.setOnMouseClicked(event -> {
      if (!FormulaFrame.isSelecting) {
        vbox.requestFocus();
        event.consume();
      }
    });
    vbox.focusedProperty().addListener(
        (observable, oldValue, newValue) -> {
          if (newValue == oldValue) {
            return;
          }
          if (oldValue) {
            Cursor.clearCursor();
          }
          if (newValue) {
            Cursor.setCursor(this);
          }
        });
    bp.setLeft(open);
    bp.setCenter(vbox);
    bp.setRight(close);
    BorderPane.setMargin(bp.getLeft(), new Insets(0, SPACE, 0, SPACE));
    BorderPane.setMargin(bp.getRight(), new Insets(0, SPACE, 0, SPACE));
    BorderPane.setAlignment(bp.getLeft(), Pos.CENTER);
    BorderPane.setAlignment(bp.getRight(), Pos.CENTER);
  }
View Full Code Here

  private final HBox hbox = new HBox();
  private static double initX;
  private static double initY;

  public HComposite() {
    hbox.setPadding(new Insets(0, SPACE, 0, SPACE));
    /**
     * hbox.setSpacing(SPACE); DON'T uncomment it. HComposite shouldn't have
     * spacing.
     **/
    // hbox.setStyle("-fx-border-color: blue;");
View Full Code Here

  public Node createContent() {
    BorderPane pane = new BorderPane();
    workflowView.setPrefWidth(600);
    pane.setCenter(workflowView);
    Button refreshButton  = new Button("Refresh");
    BorderPane.setMargin(refreshButton, new Insets(5));
    pane.setBottom(refreshButton);
    controller.refresh(copperDataProvider.getWorkflowClassesList(filterController.getFilter().selectedEngine.get().getId()));
   
    controller.selectedItem.addListener(new ChangeListener<WorkflowVersion>() {
      @Override
View Full Code Here

    ProgressIndicator indicator = new ProgressIndicator();
    indicator.setMaxHeight(350);
    indicator.setMaxWidth(350);
   
    BorderPane borderPane = new BorderPane();
    BorderPane.setMargin(indicator, new Insets(5));
    borderPane.setCenter(indicator);
    borderPane.setStyle("-fx-background-color: rgba(230,230,230,0.7);");
    return borderPane;
  }
View Full Code Here

    return borderPane;
  }
 
  public static void startValueSetAnimation(final Pane parent) {
    final javafx.scene.shape.Rectangle rectangle = new javafx.scene.shape.Rectangle();
    Insets margin = BorderPane.getMargin(parent);
    if (margin==null){
      margin= new Insets(0);
    }
    rectangle.widthProperty().bind(parent.widthProperty().subtract(margin.getLeft()+margin.getRight()));
    rectangle.heightProperty().bind(parent.heightProperty().subtract(margin.getTop()+margin.getBottom()));
    rectangle.setFill(Color.rgb(0, 150, 201));
    parent.getChildren().add(rectangle);
   
        BoxBlur bb = new BoxBlur();
        bb.setWidth(5);
View Full Code Here

        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);
       
View Full Code Here

TOP

Related Classes of javafx.geometry.Insets

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.