Skip to content
Snippets Groups Projects
Commit b48bc489 authored by Hugo Debuyser's avatar Hugo Debuyser Committed by Matias Mennecart
Browse files

Modification des fichiers FXML et ajout des controllers

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