예제 #1
0
  /** Initializes the root layout and tries to load the last opened person file. */
  public void initRootLayout() {
    try {
      // Load root layout from fxml file.
      FXMLLoader loader = new FXMLLoader();
      loader.setLocation(Main.class.getResource("view/RootLayout.fxml"));
      rootLayout = (BorderPane) loader.load();

      // Show the scene containing the root layout.
      Scene scene = new Scene(rootLayout);
      primaryStage.setScene(scene);

      // Give the controller access to the main app.
      RootLayoutController controller = loader.getController();
      controller.setMainApp(this);

      primaryStage.show();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
예제 #2
0
  /** method to insert the same value into every cell of the displayed table */
  public void insertTableValues() {
    Number value = Integer.valueOf(tableValue.getText());

    Number[][] u = root.getHpplanModel().getU();
    for (int i = 0; i < u.length; i++) {
      for (int j = 0; j < u[0].length; j++) {
        u[i][j] = value;
      }
    }

    setTableData(tableU, u, "j: ", "t: ", new Decimals(2));
  }
예제 #3
0
  /** @see de.oth.hsp.common.view.IPageController#inEvent() */
  @Override
  public void inEvent() {

    Decimals decimals = new Decimals(2);
    setTableData(tableU, root.getHpplanModel().getU(), "j: ", "t: ", decimals);
  }
예제 #4
0
 /** @see de.oth.hsp.common.view.IPageController#outEvent() */
 @Override
 public void outEvent() {
   root.getHpplanModel().setU(TableUtils.convertOListTo2DArray(tableU.getItems()));
 }