Package javafx.scene.layout

Examples of javafx.scene.layout.BorderPane


    private BorderPane border_pane = null;
    private BorderPane pane_center = null;

    public InternalPopupPanel(Node node) {
        this.node = node;
        border_pane = new BorderPane();
        pane_center = new BorderPane();
        border_pane.setStyle(
                "-fx-background-color: linear-gradient(#BABCC2, #828282);"
                + "-fx-border-radius: 2;"
                + "-fx-background-radius: 2;"
                + "-fx-effect: dropshadow(one-pass-box, black, 16, 0.0, 2, 2);"
View Full Code Here


                }).forEach((n) -> {
                    EffectFX.blurEffect(n);
                });
            }

            BorderPane bp = getMainBorderPane();
            pane.getChildren().add(bp);
            bp.requestFocus();

        }
    }
View Full Code Here

      ApplicationImpl.pane = pane;
      return this;
    }
   
    public ApplicationStarter node(Node node) {
      BorderPane borderPane = new BorderPane();
      borderPane.setCenter(node);
     
      return this.pane(borderPane);
    }
View Full Code Here

       
        callback.loadingDone(ev.getSource().getValue());
      }
    });
   
    BorderPane pane = new BorderPane();
    pane.setTop(paneInfo.getPane());
    BorderPane.setMargin(paneInfo.getPane(), new Insets(10));
   
    Pane log4jPane = Log4jAppenderController.loadPane(log4model);
   
    pane.setCenter(log4jPane);
    BorderPane.setMargin(log4jPane, new Insets(10));
       
    JuFxUtils.startApplication()
      .pane(pane)
      .title(this.getTitle())
View Full Code Here

 
  @Test
  public void backgroundLoader() {
    final BackgroundLoader backgroundLoader = new BackgroundLoader();
   
    final BorderPane pane = new BorderPane();
    pane.setPrefSize(100, 100);
   
    final Button btnRunTask = new Button("Run Task");
    btnRunTask.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent ev) {
        MyTask task = new MyTask("Task " + System.currentTimeMillis(), System.currentTimeMillis() % 2 == 0);
        backgroundLoader.execute(task, new BackgroundLoaderCallbackAdapter() {
          @Override
          public void loadingDone(Object data) {
            logger.debug("Loading done: " + data);
          }
        });
      }
    });
   
    pane.setTop(btnRunTask);
    pane.setCenter(backgroundLoader.getNotificationNode())
   
    JuFxUtils.startApplication()
      .title("TaskExecutor")
      .pane(pane)
      .start();
View Full Code Here

          break;
        }
      }
    }

    BorderPane borderPane = new BorderPane();

    Carousel<ImageHandle> carousel = new Carousel<>();

    carousel.setMinWidth(500);
    carousel.setMinHeight(300);
    carousel.setMouseTransparent(false);
    carousel.setPickOnBounds(true);
    carousel.setFocusTraversable(true);

    for(Image image : images) {
      carousel.itemsProperty().get().add(new ImageHandle(new ImageView(image)));
    }

    carousel.cellFactoryProperty().set(new Callback<Carousel<ImageHandle>, CarouselCell<ImageHandle>>() {
      @Override
      public CarouselCell<ImageHandle> call(final Carousel<ImageHandle> carousel) {
        CarouselCell<ImageHandle> carouselCell = new CarouselCell<ImageHandle>() {
          @Override
          protected void updateItem(ImageHandle item, boolean empty) {
            super.updateItem(item, empty);

            if(!empty) {
              ImageView image = item.getImage();
              image.setPreserveRatio(true);
              image.fitWidthProperty().bind(carousel.heightProperty().multiply(0.6));
              image.fitHeightProperty().bind(carousel.heightProperty().multiply(0.6));
              setGraphic(image);
            }
            else {
              setGraphic(null);
            }
          }
        };

        carouselCell.setEffect(new Reflection());

        return carouselCell;
      }
    });

    borderPane.setTop(carousel);
    borderPane.setBottom(createOptionGridPane(carousel));

    stage.setScene(new Scene(borderPane));
    stage.setWidth(800);
    stage.setHeight(600);
    stage.show();
View Full Code Here

    private Thread sensorsUpdaterThread;
   
    @Override
    public void start(Stage primaryStage) {
        lujSocket = new LujSocket();
        BorderPane bpane = new BorderPane();

        bpane.setTop(addTopHBox());
        //bpane.setRight(addRightVBox());
        bpane.setCenter(addCenterHBox());
        bpane.setBottom(addBottomVBox());

        Scene scene = new Scene(bpane);
        primaryStage.setScene(scene);
        primaryStage.setTitle("Luj Komandor");
       
View Full Code Here

    /*
     * The experiment layer contains all of the experiment-related panes.
     * The only element that sits higher than this is the function selector.
     */
    BorderPane experimentLayer = new BorderPane();
    /*
     * The left frame encapsulates the population pane and the console.
     * It goes into the center position of the experiment layer, next to the settings pane.
     */
    BorderPane leftFrame = new BorderPane();
   
    /*
     * The population pane is a TabPane containing a tab for each chromosome.
     */
    populationPane = new PopulationPane(this);
   
    /*
     * The settings pane is a big class containing the entire control pane
     */
    settingsPane = new SettingsPane(this);
   
    // make control pane and console resizable
    HorizontalDragResize.makeDragResizable(settingsPane);
    VerticalDragResize.makeDragResizable(console);
    // prevent resizables from growing larger than the experiment layer
    settingsPane.maxWidthProperty().bind(experimentLayer.widthProperty());
    console.maxHeightProperty().bind(experimentLayer.heightProperty());

    // put console and population pane in the main frame
    leftFrame.setCenter(populationPane);
    leftFrame.setBottom(console);
   
    // set the main frame and the control pane in the experiment layer
    experimentLayer.setCenter(leftFrame);
    experimentLayer.setRight(settingsPane);
   
View Full Code Here

        return "Different skin";
    }

    @Override
    public Node getPanel(Stage stage) {
        final BorderPane bp = new BorderPane();
        Label title = new Label("Inline skin");
        VBox box = new VBox(10);
        ChoiceBox<String> choiceBox = new ChoiceBox<>();
        User user = new User();

        bp.setStyle("-fx-padding: 10;");
        choiceBox.getItems().addAll("Inline skin", "Default skin");
        bp.setTop(choiceBox);
        title.setFont(Font.font(24));

        FXForm form = new FXFormBuilder<>()
                .includeAndReorder("firstName", "lastName", "age", "favoriteMovie", "coolDeveloper")
                .resourceBundle(Utils.SAMPLE)
                .build();
        form.setSource(user);
        box.getChildren().addAll(title, form);
        choiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
            @Override
            public void changed(ObservableValue<? extends String> observableValue, String s, String s2) {
                if (s2.equals("Inline skin")) {
                    title.setText("Inline skin");
                    form.setSkin(new InlineSkin(form));
                } else {
                    title.setText("Default skin");
                    form.setSkin(new DefaultSkin(form));
                }
            }
        });
        bp.setCenter(box);
        choiceBox.getSelectionModel().selectFirst();
        return bp;
    }
View Full Code Here

            public void handle(WebEvent<String> e) {
                setStatusMessage(e.getData());
            }
        });

        BorderPane pane = new BorderPane();
        pane.setCenter(webView);

        Scene scene = new Scene(pane);
        fxPanel.setScene(scene);
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.BorderPane

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.