Пример #1
0
  @Override
  public void resizeNode(double width, double height) {
    MN90.getLogger().debug(this, "Changement de taille : " + width + " - " + height);
    double widthForFit = width > height ? width : height;
    for (int i = 0; i < this.getColumnConstraints().size(); i++) {
      double value = 5;
      if (i == 1) {
        value = 10;
      }
      this.getColumnConstraints().get(i).setPercentWidth(value);
    }

    for (int i = 0; i < this.getRowConstraints().size(); i++) {
      double value = 5;
      if (i == 0) {
        value = 5;
      }
      this.getRowConstraints().get(i).setPercentHeight(value);
    }
    if (mImgView.getFitWidth() != widthForFit) mImgView.setFitWidth(widthForFit);
  }
Пример #2
0
  public PlongeeSimpleView() {
    MN90.getLogger().debug(this, "Construction de la vue PlongeeSimple");
    // this.setGridLinesVisible(MN90.AFFICHAGE_GRILLE);
    this.setGridLinesVisible(true);

    ColumnConstraints col = new ColumnConstraints();
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(90);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);
    // col.setPercentWidth(5);
    col.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().add(col);

    RowConstraints row = new RowConstraints();
    // row.setPercentHeight(90);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    // row.setPercentHeight(90);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);
    row.setVgrow(Priority.ALWAYS);
    this.getRowConstraints().add(row);

    mImgView.setImage(mImgPlongeeFond);
    mImgView.setFitWidth(100);
    mImgView.setManaged(true);
    mImgView.setPreserveRatio(true);
    mImgView.setSmooth(true);
    mImgView.setCache(true);
    this.add(mImgView, 0, 1, 13, 8);

    this.add(mHeureDepartLabel, 0, 0);

    mHeureDepartValue.setPrefWidth(100);
    mHeureDepartValue.setMaxWidth(100);
    mHeureDepartValue.setMinWidth(100);
    this.add(mHeureDepartValue, 1, 0, 2, 1);

    this.add(mProfMaxLabel, 2, 8);

    mProfMaxValue.setPrefWidth(45);
    mProfMaxValue.setMaxWidth(45);
    mProfMaxValue.setMinWidth(45);
    this.add(mProfMaxValue, 3, 8);

    this.add(mHeureSortieLabel, 10, 0);

    mHeureSortieValue.setPrefWidth(100);
    mHeureSortieValue.setMaxWidth(100);
    mHeureSortieValue.setMinWidth(100);
    this.add(mHeureSortieValue, 11, 0, 2, 1);

    this.add(mDureePlongeeLabel, 2, 7);

    mDureePlongeeValue.setPrefWidth(45);
    mDureePlongeeValue.setMaxWidth(45);
    mDureePlongeeValue.setMinWidth(45);
    this.add(mDureePlongeeValue, 3, 7);

    this.add(mPalier3mLabel, 11, 2);

    mDureePalier3mValue.setPrefWidth(50);
    mDureePalier3mValue.setMaxWidth(50);
    mDureePalier3mValue.setMinWidth(50);
    this.add(mDureePalier3mValue, 11, 3);

    this.add(mDTRLabel, 10, 8);

    mDTRValue.setPrefWidth(50);
    mDTRValue.setMaxWidth(50);
    mDTRValue.setMinWidth(50);
    this.add(mDTRValue, 11, 8);

    this.add(mGPSLabel, 10, 7);

    mGPSValue.setPrefWidth(50);
    mGPSValue.setMaxWidth(50);
    mGPSValue.setMinWidth(50);
    this.add(mGPSValue, 11, 7);
  }