All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tapirtest.execution.gui.application.views.MainView Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/**
 * MIT License
 * 
 * Copyright (c) 2018 b+m Informatik AG
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package io.tapirtest.execution.gui.application.views;

import de.bmiag.tapir.execution.model.Identifiable;
import de.saxsys.mvvmfx.InjectViewModel;
import de.saxsys.mvvmfx.JavaView;
import io.tapirtest.execution.gui.application.components.DescriptionCellValueFactory;
import io.tapirtest.execution.gui.application.components.ExecutionStatusStyledTreeTableRow;
import io.tapirtest.execution.gui.application.components.ParametersCellValueFactory;
import io.tapirtest.execution.gui.application.data.Property;
import io.tapirtest.execution.gui.application.views.MainViewModel;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.function.Consumer;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.Initializable;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBoxTreeItem;
import javafx.scene.control.Label;
import javafx.scene.control.Separator;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeTableColumn;
import javafx.scene.control.TreeTableRow;
import javafx.scene.control.TreeTableView;
import javafx.scene.control.cell.CheckBoxTreeTableCell;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.control.cell.TextFieldTableCell;
import javafx.scene.control.cell.TreeItemPropertyValueFactory;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.util.Callback;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

/**
 * The view of the main page.
 * 
 * @author Nils Christian Ehmke
 * 
 * @since 1.0.0
 */
@SuppressWarnings("all")
public class MainView extends VBox implements JavaView, Initializable {
  @InjectViewModel
  private MainViewModel mainViewModel;
  
  private final TreeTableView executionPlanTreeTableView;
  
  private final TableView propertiesTableView;
  
  public MainView() {
    Insets _insets = new Insets(10);
    this.setPadding(_insets);
    ObservableList _stylesheets = this.getStylesheets();
    String _replace = MainView.class.getCanonicalName().replace(".", "/");
    String _plus = (_replace + ".css");
    _stylesheets.add(_plus);
    ObservableList _children = this.getChildren();
    HBox _hBox = new HBox();
    final Procedure1 _function = (HBox it) -> {
      Insets _insets_1 = new Insets(0.0, 0.0, 10, 0.0);
      VBox.setMargin(it, _insets_1);
      it.setSpacing(10);
      ObservableList _children_1 = it.getChildren();
      Button _button = new Button();
      final Procedure1