Package javafx.scene.layout

Examples of javafx.scene.layout.GridPane


        break;
    }

      takeButton.disableProperty().setValue(true);

      GridPane grid = new GridPane();
      grid.add(diamonds, 0, 0);
      grid.add(hearts, 1, 0);
      grid.add(spades, 2, 0);
      grid.add(clubs, 3, 0);

      centerGrid.add(grid, 0, 1);
  }
View Full Code Here


       
    beloteCheck = new CheckBox(" Belote");
    beloteCheck.setVisible(false);
    FlowPane.setMargin(beloteCheck, in);

    foldGrid = new GridPane();
    FlowPane.setMargin(foldGrid, in);
   
    infosPane.getChildren().addAll(roundScoreLabel, trumpLabel, gameScoreLabel, tchatListView, tchatTextField, beloteCheck, foldGrid);
   
   
View Full Code Here

  /**
   * D�but du tour d'un joueur
   */
  private void start()
  {   
    southGrid = new GridPane();
    northGrid = new GridPane();
    eastGrid = new GridPane();
    westGrid = new GridPane();
    centerGrid = new GridPane();
   
    northGrid.setAlignment(Pos.CENTER);
    eastGrid.setAlignment(Pos.CENTER);
    southGrid.setAlignment(Pos.CENTER);
    westGrid.setAlignment(Pos.CENTER);
View Full Code Here

        break;
    }

      takeButton.disableProperty().setValue(true);

      GridPane grid = new GridPane();
      grid.add(diamonds, 0, 0);
      grid.add(hearts, 1, 0);
      grid.add(spades, 2, 0);
      grid.add(clubs, 3, 0);

      centerGrid.add(grid, 0, 1);
  }
View Full Code Here

    initStyle(StageStyle.DECORATED);

    Insets insets = new Insets(5, 5, 5, 5);
    BorderPane borderPane = new BorderPane();

    GridPane gridPane = new GridPane();
    gridPane.setAlignment(Pos.CENTER);

    Label teamLabel = new Label("Nom de l'�quipe");
    teamTextField = new TextField("");
    gridPane.add(teamLabel, 0, 1);
    gridPane.add(teamTextField, 1, 1);
    GridPane.setMargin(teamTextField, insets);

    // May be SelectionMode can be better
    Label teammateLabel = new Label("Nom du coequipier");
    teammateTextField = new TextField("");
    gridPane.add(teammateLabel, 0, 3);
    gridPane.add(teammateTextField, 1, 3);
    GridPane.setMargin(teammateTextField, insets);

    BorderPane.setAlignment(gridPane, Pos.CENTER);
    borderPane.setCenter(gridPane);
View Full Code Here

    }

    public void applyHardwareAxisSettings(Tab _tab) throws Exception {


        GridPane _gp = (GridPane) _tab.getContent();
        int size = _gp.getChildren().size();
        Axis _axis = this.machine.getAxisByName(String.valueOf(_gp.getId().charAt(0)));
        int i;
        for (i = 0; i < size; i++) {
            if (_gp.getChildren().get(i).getClass().toString().contains("TextField")) {
                //This ia a TextField... Lets get the value and apply it if it needs to be applied.
                TextField tf = (TextField) _gp.getChildren().get(i);
                applyHardwareAxisSettings(_axis, tf);

            } else if (_gp.getChildren().get(i) instanceof ChoiceBox) {
                //This ia a ChoiceBox... Lets get the value and apply it if it needs to be applied.
                @SuppressWarnings("unchecked")
                ChoiceBox<Object> cb = (ChoiceBox<Object>) _gp.getChildren().get(i);
                if (cb.getId().contains("AxisMode")) {
                    int axisMode = cb.getSelectionModel().getSelectedIndex();
                    String configObj = String.format("{\"%s%s\":%s}\n", _axis.getAxis_name().toLowerCase(), MnemonicManager.MNEMONIC_AXIS_AXIS_MODE, axisMode);
                    this.write(configObj);
                    continue;
View Full Code Here

         */
        Tab selectedTab = _tab.getTabPane().getSelectionModel().getSelectedItem();
        int _motorNumber = Integer.valueOf(selectedTab.getText().split(" ")[1].toString());
        Motor _motor = this.machine.getMotorByNumber(_motorNumber);

        GridPane _gp = (GridPane) _tab.getContent();
        int size = _gp.getChildren().size();
        int i;
        //Iterate though each gridpane child... Picking out text fields and choice boxes
        for (i = 0; i < size; i++) {

            if (_gp.getChildren().get(i).toString().contains("TextField")) {
                TextField tf = (TextField) _gp.getChildren().get(i);
                try {
                    applyHardwareMotorSettings(_motor, tf);
                } catch (Exception _ex) {
                    logger.error("[!]Exception in applyHardwareMotorSettings(Tab _tab)");
                }
            } else if (_gp.getChildren().get(i) instanceof ChoiceBox) {
                @SuppressWarnings("unchecked")
                ChoiceBox<Object> _cb = (ChoiceBox<Object>) _gp.getChildren().get(i);
                if (_cb.getId().contains("MapAxis")) {
                    int mapAxis;
                    switch (_cb.getSelectionModel().getSelectedItem().toString()) {
                        case "X":
                            mapAxis = 0;
View Full Code Here

    @Override public void init() {
    }

    @Override public void start(Stage stage) {
        GridPane pane = new GridPane();
        for (int y = 0; y < 20; y++) {
            for (int x = 0; x < 20; x++) {
                pane.add(new Led(Color.rgb(RND.nextInt(255), RND.nextInt(255), RND.nextInt(255)),
                                   false,
                                   500_000_000l,
                                   true)
                                   , x, y);
            }
        }
        pane.sceneProperty().addListener(observable -> start = LocalTime.now());

        Scene scene = new Scene(pane);

        stage.setTitle("Led demo");
        stage.setScene(scene);
View Full Code Here

    @Override public void init() {
    }

    @Override public void start(Stage stage) {
        GridPane pane = new GridPane();
        for (int y = 0 ; y < 20 ; y++) {
            for (int x = 0 ; x < 20 ; x++) {               
                pane.add(LedBuilder.create()
                                   .ledColor(Color.rgb(RND.nextInt(255), RND.nextInt(255), RND.nextInt(255)))
                                   .frameVisible(false)
                                   .build(), x, y);               
            }
        }
        pane.sceneProperty().addListener(observable -> start = LocalTime.now());

        Scene scene = new Scene(pane);

        stage.setTitle("Led demo");
        stage.setScene(scene);
        stage.show();

        stop = LocalTime.now();
        System.out.println("Canvas Led: ");
        System.out.println("Start: " + start);
        System.out.println("Stop : " + stop);

        calcNoOfNodes(scene.getRoot());
        System.out.println(noOfNodes + " Nodes in SceneGraph");
        System.out.println(((stop.toNanoOfDay() - start.toNanoOfDay())) / noOfNodes / 1000000d + " [ms/node]");

        for (Node node : pane.getChildren()) {
            ((Led) node).setBlinking(true);
        }
    }
View Full Code Here

    @Override public void init() {
    }

    @Override public void start(Stage stage) {
        GridPane pane = new GridPane();
        for (int y = 0 ; y < 20 ; y++) {
            for (int x = 0 ; x < 20 ; x++) {
                pane.add(LedBuilder.create()
                                   .ledColor(Color.rgb(RND.nextInt(255), RND.nextInt(255), RND.nextInt(255)))
                                   .frameVisible(false)
                                   .build(), x, y);
            }
        }
        pane.sceneProperty().addListener(observable -> start = LocalTime.now());

        Scene scene = new Scene(pane);

        stage.setTitle("Led demo");
        stage.setScene(scene);
        stage.show();

        stop = LocalTime.now();
        System.out.println("CSS Led: ");
        System.out.println("Start: " + start);
        System.out.println("Stop : " + stop);

        calcNoOfNodes(scene.getRoot());
        System.out.println(noOfNodes + " Nodes in SceneGraph");
        System.out.println(((stop.toNanoOfDay() - start.toNanoOfDay())) / noOfNodes / 1000000d + " [ms/node]");
       
        for (Node node : pane.getChildren()) {
            ((Led) node).setBlinking(true);
        }
    }
View Full Code Here

TOP

Related Classes of javafx.scene.layout.GridPane

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.