i think im done?
This commit is contained in:
parent
1df97b4d3f
commit
833331a893
@ -1,38 +0,0 @@
|
|||||||
package dev.ksan.GUI;
|
|
||||||
|
|
||||||
import javafx.geometry.Pos;
|
|
||||||
import javafx.scene.Scene;
|
|
||||||
import javafx.scene.control.Button;
|
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.layout.VBox;
|
|
||||||
import javafx.stage.Stage;
|
|
||||||
|
|
||||||
public class HomeView {
|
|
||||||
|
|
||||||
private final Stage stage;
|
|
||||||
|
|
||||||
public HomeView(Stage stage) {
|
|
||||||
this.stage = stage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void show() {
|
|
||||||
Label title = new Label("E-Voting");
|
|
||||||
title.setStyle("-fx-font-size: 32px; -fx-font-weight: bold;");
|
|
||||||
|
|
||||||
Button loginBtn = new Button("Login");
|
|
||||||
Button registerBtn = new Button("Register");
|
|
||||||
|
|
||||||
loginBtn.setPrefWidth(200);
|
|
||||||
registerBtn.setPrefWidth(200);
|
|
||||||
|
|
||||||
loginBtn.setOnAction(e -> System.out.println("Go to Login"));
|
|
||||||
registerBtn.setOnAction(e -> System.out.println("Go to Register"));
|
|
||||||
|
|
||||||
VBox layout = new VBox(20, title, loginBtn, registerBtn);
|
|
||||||
layout.setAlignment(Pos.CENTER);
|
|
||||||
|
|
||||||
stage.setScene(new Scene(layout, 500, 400));
|
|
||||||
stage.setTitle("Home");
|
|
||||||
stage.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +1,13 @@
|
|||||||
package dev.ksan;
|
package dev.ksan;
|
||||||
|
|
||||||
import dev.ksan.CASystem.*;
|
import dev.ksan.CASystem.*;
|
||||||
import dev.ksan.GUI.HomeView;
|
|
||||||
import dev.ksan.ui.HomeController;
|
import dev.ksan.ui.HomeController;
|
||||||
import javafx.application.Application;
|
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Button;
|
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
|
|
||||||
import java.security.KeyPair;
|
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.security.cert.X509Certificate;
|
|
||||||
|
|
||||||
import static dev.ksan.CASystem.CA.publicKeyToPem;
|
|
||||||
|
|
||||||
|
|
||||||
public class Main extends javafx.application.Application {
|
public class Main extends javafx.application.Application {
|
||||||
|
|||||||
@ -57,12 +57,18 @@ public class LoginController {
|
|||||||
private X509Certificate loadedCert;
|
private X509Certificate loadedCert;
|
||||||
private CAType detectedCAType;
|
private CAType detectedCAType;
|
||||||
|
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Button backButton;
|
||||||
|
|
||||||
public void setStage(Stage stage) {
|
public void setStage(Stage stage) {
|
||||||
this.stage = stage;
|
this.stage = stage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
backButton.setOnAction(e -> goBack());
|
||||||
|
|
||||||
showForm1();
|
showForm1();
|
||||||
dropZone.setStyle(
|
dropZone.setStyle(
|
||||||
"-fx-border-color: #888;" +
|
"-fx-border-color: #888;" +
|
||||||
@ -324,4 +330,29 @@ public class LoginController {
|
|||||||
form1.setVisible(true);
|
form1.setVisible(true);
|
||||||
form2.setVisible(false);
|
form2.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void goBack() {
|
||||||
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/HomeView.fxml"));
|
||||||
|
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(
|
||||||
|
loader.load(),
|
||||||
|
oldScene.getWidth(),
|
||||||
|
oldScene.getHeight()
|
||||||
|
);
|
||||||
|
|
||||||
|
HomeController controller = loader.getController();
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Home");
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +0,0 @@
|
|||||||
package dev.ksan.ui;
|
|
||||||
|
|
||||||
|
|
||||||
public class PollListCell {
|
|
||||||
}
|
|
||||||
@ -3,12 +3,19 @@ package dev.ksan.ui;
|
|||||||
import dev.ksan.CASystem.RegistrationService;
|
import dev.ksan.CASystem.RegistrationService;
|
||||||
import dev.ksan.Users.Organizer;
|
import dev.ksan.Users.Organizer;
|
||||||
import dev.ksan.Users.Voter;
|
import dev.ksan.Users.Voter;
|
||||||
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Button;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.control.PasswordField;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.*;
|
||||||
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
|
|
||||||
public class RegisterOrganizerController {
|
public class RegisterOrganizerController {
|
||||||
|
|
||||||
private Stage stage;
|
private Stage stage;
|
||||||
@ -28,6 +35,11 @@ public class RegisterOrganizerController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Button registerButton;
|
private Button registerButton;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Button backButton;
|
||||||
|
@FXML
|
||||||
|
private Label errorLabel;
|
||||||
|
|
||||||
public Stage getStage() {
|
public Stage getStage() {
|
||||||
return stage;
|
return stage;
|
||||||
}
|
}
|
||||||
@ -37,6 +49,9 @@ public class RegisterOrganizerController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
backButton.setOnAction(e -> goBack());
|
||||||
|
|
||||||
|
|
||||||
registerButton.setOnAction(event -> tryRegisterVoter());
|
registerButton.setOnAction(event -> tryRegisterVoter());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,19 +67,58 @@ public class RegisterOrganizerController {
|
|||||||
|
|
||||||
RegistrationService.registerOrganizer(organizer, passwordField.getText());
|
RegistrationService.registerOrganizer(organizer, passwordField.getText());
|
||||||
|
|
||||||
|
boolean saved = exportKeystoreToUserLocation(organizer);
|
||||||
|
if (!saved) {
|
||||||
|
showWarning("Keystore not exported. You can find it at: keystores/organizers/"
|
||||||
|
+ organizer.getId() + ".p12");
|
||||||
|
}
|
||||||
|
loginUser(organizer);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
displayError("Username already Taken");
|
displayError("Username already Taken");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
private void loginUser(Organizer organizer) {
|
||||||
private void loginUser(Voter voter) {
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(
|
||||||
|
getClass().getResource("/fxml/OrganizerView.fxml"));
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(loader.load(),
|
||||||
|
oldScene.getWidth(), oldScene.getHeight());
|
||||||
|
|
||||||
|
OrganizerController controller = loader.getController();
|
||||||
|
controller.setOrganizer(organizer);
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Organizer — " + organizer.getName());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
displayError("Failed to load organizer view: " + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void displayError(String message) {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
errorLabel.setText("⚠️ " + message);
|
||||||
|
errorLabel.setStyle("-fx-text-fill: red;");
|
||||||
|
errorLabel.setVisible(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//TODO
|
private void showWarning(String message) {
|
||||||
private void displayError(String usernameAlreadyTaken) {
|
Platform.runLater(() -> {
|
||||||
|
errorLabel.setText("⚠️ " + message);
|
||||||
|
errorLabel.setStyle("-fx-text-fill: orange;");
|
||||||
|
errorLabel.setVisible(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if everything is filled
|
// return true if everything is filled
|
||||||
@ -99,4 +153,64 @@ public class RegisterOrganizerController {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void goBack() {
|
||||||
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/RegisterTypeView.fxml"));
|
||||||
|
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(
|
||||||
|
loader.load(),
|
||||||
|
oldScene.getWidth(),
|
||||||
|
oldScene.getHeight()
|
||||||
|
);
|
||||||
|
|
||||||
|
RegisterTypeController controller = loader.getController();
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Back");
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private boolean exportKeystoreToUserLocation(Organizer organizer) {
|
||||||
|
FileChooser fileChooser = new FileChooser();
|
||||||
|
fileChooser.setTitle("Save Your Keystore Certificate");
|
||||||
|
fileChooser.setInitialFileName(organizer.getId() + ".p12");
|
||||||
|
fileChooser.getExtensionFilters().add(
|
||||||
|
new FileChooser.ExtensionFilter("PKCS12 Keystore (*.p12)", "*.p12")
|
||||||
|
);
|
||||||
|
|
||||||
|
// Default to user's home directory
|
||||||
|
fileChooser.setInitialDirectory(
|
||||||
|
new File(System.getProperty("user.home"))
|
||||||
|
);
|
||||||
|
|
||||||
|
File destination = fileChooser.showSaveDialog(stage);
|
||||||
|
if (destination == null) return false; // user cancelled
|
||||||
|
|
||||||
|
Path source = Path.of("keystores/users/" +organizer.getId() + ".p12");
|
||||||
|
try {
|
||||||
|
Files.copy(source, destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Keystore Saved");
|
||||||
|
alert.setHeaderText("Your certificate has been saved.");
|
||||||
|
alert.setContentText(
|
||||||
|
"Location: " + destination.getAbsolutePath() + "\n\n" +
|
||||||
|
"Keep this file safe — you need it to log in.\n" +
|
||||||
|
"Do not share it with anyone."
|
||||||
|
);
|
||||||
|
alert.showAndWait();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
displayError("Failed to export keystore: " + e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,11 @@ public class RegisterTypeController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Button organizerButton;
|
private Button organizerButton;
|
||||||
|
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Button backButton;
|
||||||
|
|
||||||
|
|
||||||
private Stage stage;
|
private Stage stage;
|
||||||
|
|
||||||
public void setStage(Stage stage) {
|
public void setStage(Stage stage) {
|
||||||
@ -24,6 +29,7 @@ public class RegisterTypeController {
|
|||||||
public void initialize() {
|
public void initialize() {
|
||||||
voterButton.setOnAction(e -> goToVoter());
|
voterButton.setOnAction(e -> goToVoter());
|
||||||
organizerButton.setOnAction(e -> goToOrganizer());
|
organizerButton.setOnAction(e -> goToOrganizer());
|
||||||
|
backButton.setOnAction(e -> goBack());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -64,4 +70,27 @@ public class RegisterTypeController {
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void goBack() {
|
||||||
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/HomeView.fxml"));
|
||||||
|
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(
|
||||||
|
loader.load(),
|
||||||
|
oldScene.getWidth(),
|
||||||
|
oldScene.getHeight()
|
||||||
|
);
|
||||||
|
|
||||||
|
HomeController controller = loader.getController();
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Home");
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,12 +3,19 @@ package dev.ksan.ui;
|
|||||||
import dev.ksan.CASystem.RegistrationService;
|
import dev.ksan.CASystem.RegistrationService;
|
||||||
import dev.ksan.Users.UserRepository;
|
import dev.ksan.Users.UserRepository;
|
||||||
import dev.ksan.Users.Voter;
|
import dev.ksan.Users.Voter;
|
||||||
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Button;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.control.PasswordField;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.*;
|
||||||
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
|
|
||||||
public class RegisterVoterController {
|
public class RegisterVoterController {
|
||||||
|
|
||||||
private Stage stage;
|
private Stage stage;
|
||||||
@ -32,6 +39,11 @@ public class RegisterVoterController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Button registerButton;
|
private Button registerButton;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Button backButton;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Label errorLabel;
|
||||||
|
|
||||||
public void setStage(Stage stage) {
|
public void setStage(Stage stage) {
|
||||||
this.stage = stage;
|
this.stage = stage;
|
||||||
@ -41,6 +53,8 @@ public class RegisterVoterController {
|
|||||||
}
|
}
|
||||||
@FXML
|
@FXML
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
backButton.setOnAction(e -> goBack());
|
||||||
|
|
||||||
registerButton.setOnAction(event -> tryRegisterVoter());
|
registerButton.setOnAction(event -> tryRegisterVoter());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +70,11 @@ public class RegisterVoterController {
|
|||||||
|
|
||||||
|
|
||||||
RegistrationService.registerVoter(voter, passwordField.getText());
|
RegistrationService.registerVoter(voter, passwordField.getText());
|
||||||
|
boolean saved = exportKeystoreToUserLocation(voter);
|
||||||
|
if (!saved) {
|
||||||
|
showWarning("Keystore not exported. You can find it at: keystores/users/"
|
||||||
|
+ voter.getUsername() + ".p12");
|
||||||
|
}
|
||||||
loginUser(voter);
|
loginUser(voter);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
displayError("Username already Taken");
|
displayError("Username already Taken");
|
||||||
@ -64,14 +82,79 @@ public class RegisterVoterController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
private boolean exportKeystoreToUserLocation(Voter voter) {
|
||||||
|
FileChooser fileChooser = new FileChooser();
|
||||||
|
fileChooser.setTitle("Save Your Keystore Certificate");
|
||||||
|
fileChooser.setInitialFileName(voter.getUsername() + ".p12");
|
||||||
|
fileChooser.getExtensionFilters().add(
|
||||||
|
new FileChooser.ExtensionFilter("PKCS12 Keystore (*.p12)", "*.p12")
|
||||||
|
);
|
||||||
|
|
||||||
|
// Default to user's home directory
|
||||||
|
fileChooser.setInitialDirectory(
|
||||||
|
new File(System.getProperty("user.home"))
|
||||||
|
);
|
||||||
|
|
||||||
|
File destination = fileChooser.showSaveDialog(stage);
|
||||||
|
if (destination == null) return false; // user cancelled
|
||||||
|
|
||||||
|
Path source = Path.of("keystores/users/" + voter.getUsername() + ".p12");
|
||||||
|
try {
|
||||||
|
Files.copy(source, destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
|
||||||
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||||
|
alert.setTitle("Keystore Saved");
|
||||||
|
alert.setHeaderText("Your certificate has been saved.");
|
||||||
|
alert.setContentText(
|
||||||
|
"Location: " + destination.getAbsolutePath() + "\n\n" +
|
||||||
|
"Keep this file safe — you need it to log in.\n" +
|
||||||
|
"Do not share it with anyone."
|
||||||
|
);
|
||||||
|
alert.showAndWait();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
displayError("Failed to export keystore: " + e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void loginUser(Voter voter) {
|
private void loginUser(Voter voter) {
|
||||||
System.out.println("registered: " + voter);
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(
|
||||||
|
getClass().getResource("/fxml/VoterView.fxml"));
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(loader.load(),
|
||||||
|
oldScene.getWidth(), oldScene.getHeight());
|
||||||
|
|
||||||
|
VoterController controller = loader.getController();
|
||||||
|
controller.setVoter(voter);
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Voter — " + voter.getUsername());
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
displayError("Failed to load voter view: " + e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO
|
private void displayError(String message) {
|
||||||
private void displayError(String usernameAlreadyTaken) {
|
Platform.runLater(() -> {
|
||||||
|
errorLabel.setText("⚠️ " + message);
|
||||||
|
errorLabel.setStyle("-fx-text-fill: red;");
|
||||||
|
errorLabel.setVisible(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showWarning(String message) {
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
errorLabel.setText("⚠️ " + message);
|
||||||
|
errorLabel.setStyle("-fx-text-fill: orange;");
|
||||||
|
errorLabel.setVisible(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if everything is filled
|
// return true if everything is filled
|
||||||
@ -110,10 +193,35 @@ public class RegisterVoterController {
|
|||||||
|
|
||||||
if(UserRepository.voterExists(usernameField.getText().trim())){
|
if(UserRepository.voterExists(usernameField.getText().trim())){
|
||||||
displayError("Username already Taken");
|
displayError("Username already Taken");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void goBack() {
|
||||||
|
try {
|
||||||
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/RegisterTypeView.fxml"));
|
||||||
|
|
||||||
|
Scene oldScene = stage.getScene();
|
||||||
|
Scene scene = new Scene(
|
||||||
|
loader.load(),
|
||||||
|
oldScene.getWidth(),
|
||||||
|
oldScene.getHeight()
|
||||||
|
);
|
||||||
|
|
||||||
|
RegisterTypeController controller = loader.getController();
|
||||||
|
controller.setStage(stage);
|
||||||
|
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.setTitle("Back");
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,18 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
|
<?import javafx.scene.layout.HBox?>
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.LoginController">
|
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.LoginController">
|
||||||
|
<top>
|
||||||
|
<HBox >
|
||||||
|
<children>
|
||||||
|
<Button fx:id="backButton" text="← Back" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets left="10.0" top="10.0"/>
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@ -13,7 +13,19 @@
|
|||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
|
|
||||||
|
<?import javafx.scene.layout.HBox?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterOrganizerController">
|
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterOrganizerController">
|
||||||
|
<top>
|
||||||
|
<HBox >
|
||||||
|
<children>
|
||||||
|
<Button fx:id="backButton" text="← Back" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets left="10.0" top="10.0"/>
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
@ -63,6 +75,8 @@
|
|||||||
<Insets left="100.0" right="100.0" />
|
<Insets left="100.0" right="100.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
<Label fx:id="errorLabel"
|
||||||
|
style="-fx-text-fill: red;"/>
|
||||||
<Button fx:id="registerButton" mnemonicParsing="false" text="Register">
|
<Button fx:id="registerButton" mnemonicParsing="false" text="Register">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets top="10.0" />
|
<Insets top="10.0" />
|
||||||
|
|||||||
@ -11,6 +11,16 @@
|
|||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterTypeController">
|
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterTypeController">
|
||||||
|
<top>
|
||||||
|
<HBox >
|
||||||
|
<children>
|
||||||
|
<Button fx:id="backButton" text="← Back" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets left="10.0" top="10.0"/>
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@ -12,7 +12,19 @@
|
|||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
|
<?import javafx.scene.layout.HBox?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterVoterController">
|
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.RegisterVoterController">
|
||||||
|
<top>
|
||||||
|
<HBox >
|
||||||
|
<children>
|
||||||
|
<Button fx:id="backButton" text="← Back" />
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets left="10.0" top="10.0"/>
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
@ -92,6 +104,8 @@
|
|||||||
<Insets left="100.0" right="50.0" />
|
<Insets left="100.0" right="50.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
<Label fx:id="errorLabel"
|
||||||
|
style="-fx-text-fill: red;"/>
|
||||||
<Button fx:id="registerButton" mnemonicParsing="false" text="Register">
|
<Button fx:id="registerButton" mnemonicParsing="false" text="Register">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
<Insets left="100.0" top="10.0" />
|
<Insets left="100.0" top="10.0" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user