Skip to content
Snippets Groups Projects
Commit e968dc08 authored by Hugo Debuyser's avatar Hugo Debuyser
Browse files

Modification des fichiers FXML et ajout des controllers

parent 5cd3835d
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.stage.*?>
<Stage xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1">
<Stage fx:id="stage" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univlille.sae.classification.controller.AddDataController">
<scene>
<Scene>
<AnchorPane prefHeight="200" prefWidth="200">
......@@ -21,7 +21,7 @@
<HBox alignment="CENTER" layoutX="10.0" layoutY="47.0" prefHeight="17.0" prefWidth="335.0" spacing="20.0">
<children>
<Label text="Valeur 2" />
<ChoiceBox prefWidth="150.0" />
<ChoiceBox prefHeight="26.0" prefWidth="163.0" />
</children>
</HBox>
<HBox alignment="CENTER" layoutX="10.0" layoutY="109.0" prefHeight="17.0" prefWidth="335.0" spacing="20.0">
......@@ -30,7 +30,7 @@
<Spinner />
</children>
</HBox>
<Button mnemonicParsing="false" text="Valider" />
<Button fx:id="confirmAdd" mnemonicParsing="false" text="Valider" />
</children></VBox>
</children></AnchorPane>
</Scene>
......
......@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.stage.*?>
<Stage xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1">
<Stage fx:id="stage" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univlille.sae.classification.controller.AxesSettingsController">
<scene>
<Scene>
<AnchorPane prefHeight="200" prefWidth="200">
......@@ -15,16 +15,16 @@
<HBox alignment="CENTER" prefHeight="46.0" prefWidth="406.0" spacing="20.0">
<children>
<Label text="Valeur des ordonnées" />
<ChoiceBox prefWidth="150.0" />
<ChoiceBox fx:id="selectOrd" prefWidth="150.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="44.0" prefWidth="406.0" spacing="20.0">
<children>
<Label text="Valeur des abscisses" />
<ChoiceBox prefWidth="150.0" />
<ChoiceBox fx:id="selectAbs" prefWidth="150.0" />
</children>
</HBox>
<Button mnemonicParsing="false" text="Valider" />
<Button fx:id="confirmAxes" mnemonicParsing="false" text="Valider" />
</children>
</VBox>
</children></AnchorPane>
......
......@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.stage.*?>
<Stage xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1">
<Stage fx:id="stage" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univlille.sae.classification.controller.DisplaySettingsController">
<scene>
<Scene>
<AnchorPane prefHeight="200" prefWidth="200">
......@@ -15,9 +15,9 @@
<HBox alignment="CENTER" prefHeight="58.0" prefWidth="294.0" spacing="20.0">
<children>
<Label text="Nouvel ajout" />
<ColorPicker editable="true" />
<ColorPicker fx:id="addColor" editable="true" />
</children></HBox>
<Button mnemonicParsing="false" text="Valider" />
<Button fx:id="confirmSettings" mnemonicParsing="false" text="Valider" />
</children></VBox>
</children></AnchorPane>
</Scene>
......
......@@ -14,13 +14,13 @@
<children>
<HBox alignment="CENTER" prefHeight="91.0" prefWidth="272.0">
<children>
<Button mnemonicParsing="false" onAction="#openFileChooser" text="Parcourir" />
<TextField prefHeight="26.0" prefWidth="207.0" />
<Button fx:id="browseFile" mnemonicParsing="false" onAction="#openFileChooser" text="Parcourir" />
<TextField fx:id="filePath" prefHeight="26.0" prefWidth="207.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="76.0" prefWidth="310.0">
<children>
<Button mnemonicParsing="false" onAction="#validate" text="Valider" />
<Button fx:id="confirmDataSelection" mnemonicParsing="false" onAction="#validate" text="Valider" />
</children>
</HBox>
</children>
......
......@@ -13,24 +13,25 @@
<children>
<VBox prefHeight="488.0" prefWidth="691.0">
<children>
<VBox alignment="CENTER" prefHeight="379.0" prefWidth="691.0">
<HBox prefHeight="356.0" prefWidth="691.0">
<children>
<Region prefHeight="338.0" prefWidth="65.0" />
<ScatterChart prefHeight="342.0" prefWidth="609.0">
<xAxis>
<CategoryAxis prefHeight="21.0" prefWidth="498.0" side="BOTTOM" />
<CategoryAxis fx:id="absAxe" prefHeight="21.0" prefWidth="498.0" side="BOTTOM" />
</xAxis>
<yAxis>
<NumberAxis side="LEFT" />
<NumberAxis fx:id="ordAxe" side="LEFT" />
</yAxis>
</ScatterChart>
<Button mnemonicParsing="false" text="Configuration de l'affichage" />
<Button fx:id="settings" mnemonicParsing="false" text="Réglage" />
</children>
</VBox>
</HBox>
<HBox alignment="CENTER" prefHeight="169.0" prefWidth="691.0" spacing="50.0">
<children>
<Button mnemonicParsing="false" onAction="#openLoadData" prefHeight="27.0" prefWidth="185.0" text="Charger un jeu de données" />
<Button mnemonicParsing="false" prefHeight="26.0" prefWidth="141.0" text="Ajouter une donnée" />
<Button disable="true" mnemonicParsing="false" prefHeight="26.0" prefWidth="157.0" text="Classifier une donnée" />
<Button fx:id="loadData" mnemonicParsing="false" onAction="#openLoadData" prefHeight="27.0" prefWidth="185.0" text="Charger un jeu de données" />
<Button fx:id="addData" mnemonicParsing="false" prefHeight="26.0" prefWidth="141.0" text="Ajouter une donnée" />
<Button fx:id="classifyData" disable="true" mnemonicParsing="false" prefHeight="26.0" prefWidth="157.0" text="Classifier une donnée" />
</children>
</HBox>
</children>
......
package fr.univlille.sae.classification.controller;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.stage.Stage;
public class AddDataController {
@FXML
Stage stage;
@FXML
Button confirmAdd;
}
package fr.univlille.sae.classification.controller;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ChoiceBox;
public class AxesSettingsController {
@FXML
ChoiceBox selectOrd;
@FXML
ChoiceBox selectAbs;
@FXML
Button confirmAxes;
}
package fr.univlille.sae.classification.controller;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ColorPicker;
import javafx.stage.Stage;
public class DisplaySettingsController {
@FXML
Stage stage;
@FXML
Button confirmSettings;
@FXML
ColorPicker addColor;
}
package fr.univlille.sae.classification.controller;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
......@@ -14,7 +16,13 @@ public class LoadDataController {
Stage stage;
@FXML
Label filenamelab;
Button browseFile;
@FXML
Button confirmDataSelection;
@FXML
TextField filePath;
File file;
......@@ -34,7 +42,7 @@ public class LoadDataController {
this.file = fileChooser.showOpenDialog(stage);
if(file != null) {
filenamelab.setText(file.getName());
filePath.setText(file.getName());
}
}
......
......@@ -2,10 +2,9 @@ package fr.univlille.sae.classification.controller;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.scene.chart.*;
import javafx.scene.control.Button;
import javafx.stage.*;
import java.io.File;
import java.io.IOException;
......@@ -17,6 +16,25 @@ public class MainStageController {
@FXML
Stage stage;
@FXML
CategoryAxis absAxe;
@FXML
NumberAxis ordAxe;
@FXML
Button settings;
@FXML
Button loadData;
@FXML
Button addData;
@FXML
Button classifyData;
Stage loadStage;
......@@ -25,9 +43,6 @@ public class MainStageController {
* @throws IOException
*/
public void openLoadData() throws IOException {
FXMLLoader loader = new FXMLLoader();
URL fxmlFileUrl = new File(System.getProperty("user.dir") + File.separator + "res" + File.separator + "stages" + File.separator + "load-data-stage.fxml").toURI().toURL();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment