MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 93e2780b authored by THEBAULT Antoine's avatar THEBAULT Antoine
Browse files

add titledPane for transitions, places, events and dependencies

parent 26fbf578
Pipeline #183255 passed with stage
in 3 minutes and 40 seconds
......@@ -41,6 +41,7 @@ import javafx.scene.control.TableColumn;
import javafx.scene.control.TableRow;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.TitledPane;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
......@@ -108,6 +109,7 @@ public class Main extends Application {
static GridPane grid = new GridPane();
Label eventLabel = new Label("Event");
TitledPane eventPane;
@FXML
private static TableView<TableEvent> eventTable = new TableView<>();
static ObservableList<TableEvent> eventsList = FXCollections.observableArrayList();
......@@ -123,6 +125,7 @@ public class Main extends Application {
private static TableColumn<TableEvent, String> realized = new TableColumn<>("realized");
Label dependencyLabel = new Label("Dependency");
TitledPane dependencyPane;
@FXML
private static TableView<TableDependency> dependencyTable = new TableView<>();
static ObservableList<TableDependency> dependenciesList = FXCollections.observableArrayList();
......@@ -139,7 +142,9 @@ public class Main extends Application {
static Button oneStep = new Button("One step");
Label transitionsLabel = new Label("Transitions");
TitledPane transitionsPane;
Label placesLabel = new Label("Places");
TitledPane placesPane;
static Label steps = new Label("Enter the number of steps : ");
static TextField nbSteps = new TextField();
......@@ -240,10 +245,10 @@ public class Main extends Application {
}
eventTable.setItems(eventsList);
dependencyTable.setItems(dependenciesList);
grid.getChildren().remove(eventTable);
grid.getChildren().remove(dependencyTable);
grid.add(eventTable, 3, 1);
grid.add(dependencyTable,4,1);
grid.getChildren().remove(eventPane);
grid.getChildren().remove(dependencyPane);
grid.add(eventPane, 3, 1);
grid.add(dependencyPane,4,1);
}
/**start the simulation after Ok is clicked and the number of steps is provided*/
......@@ -303,8 +308,8 @@ public class Main extends Application {
/*grid.add(steps, 0, 3);
grid.add(nbSteps, 0, 4);
grid.add(ok, 1, 4);*/
grid.add(transitionsLabel, 0, 0);
grid.add(placesLabel, 1, 0);
//grid.add(transitionsLabel, 0, 0);
//grid.add(placesLabel, 1, 0);
name.setCellValueFactory(new PropertyValueFactory("name"));
content.setCellValueFactory(new PropertyValueFactory("content"));
......@@ -322,8 +327,12 @@ public class Main extends Application {
transitionTable.getColumns().addAll(transitionName, pre, post, distribution, lowerBound, upperBound, clock);
transitionTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
placesTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
grid.add(placesTable, 1, 1);
grid.add(transitionTable, 0, 1);
transitionsPane = new TitledPane("Transitions", transitionTable);
placesPane = new TitledPane("Places", placesTable);
transitionsPane.setCollapsible(false);
placesPane.setCollapsible(false);
grid.add(placesPane, 1, 1);
grid.add(transitionsPane, 0, 1);
JfxUtils.addButtonToTable(transitionTable, primaryStage);
TilePane tpOneStep = new TilePane(Orientation.HORIZONTAL);
......@@ -363,10 +372,14 @@ public class Main extends Application {
dependencyTable.setItems(dependenciesList);
eventTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
grid.add(controlTT, 3, 2);
grid.add(eventLabel, 3, 0);
grid.add(eventTable, 3, 1);
grid.add(dependencyLabel, 4, 0);
grid.add(dependencyTable,4,1);
//grid.add(eventLabel, 3, 0);
eventPane = new TitledPane("Events", eventTable);
eventPane.setCollapsible(false);
grid.add(eventPane, 3, 1);
//grid.add(dependencyLabel, 4, 0);
dependencyPane = new TitledPane("Dependencies", dependencyTable);
dependencyPane.setCollapsible(false);
grid.add(dependencyPane,4,1);
grid.add(stepTT, 3, 3);
tpTimeTT = new TilePane(Orientation.HORIZONTAL);
......@@ -461,7 +474,7 @@ public class Main extends Application {
upperBound.setCellValueFactory(new PropertyValueFactory("upperBound"));
clock.setCellValueFactory(new PropertyValueFactory("clock"));
transitionTable.setItems(transitionsList);
grid.getChildren().remove(transitionTable);
grid.getChildren().remove(transitionsPane);
transitionTable.setRowFactory( tv -> {
TableRow<TransitionDom> row = new TableRow<>();
......@@ -478,7 +491,7 @@ public class Main extends Application {
});
//transitionTable.setMaxWidth(100);
grid.add(transitionTable, 0, 1);
grid.add(transitionsPane, 0, 1);
VBox root = new VBox();
openFileItem = new MenuItem("Load Net");
openFileItem.setOnAction((EventHandler<ActionEvent>) new EventHandler<ActionEvent>() {
......@@ -516,8 +529,8 @@ public class Main extends Application {
name.setCellValueFactory(new PropertyValueFactory("name"));
content.setCellValueFactory(new PropertyValueFactory("content"));
placesTable.setItems(placesList);
grid.getChildren().remove(placesTable);
grid.add(placesTable, 1, 1);
grid.getChildren().remove(placesPane);
grid.add(placesPane, 1, 1);
VBox root = new VBox();
root.getChildren().addAll(menuBar, grid);
scene.setRoot(root);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment