improved the edit,create-user to JFX
This commit is contained in:
parent
af441656de
commit
111d5758e0
@ -1,14 +1,14 @@
|
||||
//Alex Rechtin//
|
||||
package users;
|
||||
|
||||
import com.jfoenix.controls.JFXPasswordField;
|
||||
import com.jfoenix.controls.JFXTextField;
|
||||
import com.jfoenix.controls.JFXToggleButton;
|
||||
import helper.HttpRequestException;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.PasswordField;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.control.ToggleButton;
|
||||
import javafx.stage.Stage;
|
||||
import container.DataController;
|
||||
import container.User;
|
||||
@ -18,17 +18,17 @@ import java.util.Objects;
|
||||
public class CreateUserController {
|
||||
|
||||
@FXML
|
||||
protected TextField textName;
|
||||
protected JFXTextField textName;
|
||||
@FXML
|
||||
protected PasswordField textPassword;
|
||||
protected JFXPasswordField textPassword;
|
||||
@FXML
|
||||
protected PasswordField textPasswordSecond;
|
||||
protected JFXPasswordField textPasswordSecond;
|
||||
@FXML
|
||||
protected ToggleButton checkButtonIsAdmin;
|
||||
protected JFXToggleButton checkButtonIsAdmin;
|
||||
@FXML
|
||||
protected TextField textLogin;
|
||||
protected JFXTextField textLogin;
|
||||
@FXML
|
||||
protected TextField textForename;
|
||||
protected JFXTextField textForename;
|
||||
@FXML
|
||||
protected Label labelError;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*Alex Rechtin*/
|
||||
* {
|
||||
-fx-dark-background-color: #3E415F;
|
||||
-fx-bright-background-color: #ffffff;
|
||||
-fx-bright-border-color: #B0B0B0;
|
||||
-fx-brighter-text-color: #ff5555;
|
||||
-fx-brightest-text-color: #ffffff;
|
||||
@ -36,6 +37,7 @@ Label{
|
||||
}
|
||||
|
||||
.textField{
|
||||
-fx-background-color: -fx-bright-background-color;
|
||||
-fx-max-width: 400px;
|
||||
-fx-min-width: 400px;
|
||||
}
|
||||
@ -46,7 +48,8 @@ Label{
|
||||
-fx-text-fill: -fx-brighter-text-color;
|
||||
}
|
||||
|
||||
Button{
|
||||
JFXButton{
|
||||
-fx-background-color: -fx-bright-background-color;
|
||||
-fx-max-width: 150px;
|
||||
-fx-min-width: 150px;
|
||||
}
|
||||
|
@ -2,10 +2,13 @@
|
||||
|
||||
<!-- Alex Rechtin -->
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import com.jfoenix.controls.JFXToggleButton?>
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import com.jfoenix.controls.JFXPasswordField?>
|
||||
<?import com.jfoenix.controls.JFXTextField?>
|
||||
<GridPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="users.CreateUserController">
|
||||
@ -37,11 +40,11 @@
|
||||
|
||||
<Label styleClass="inputLabelAdmin" GridPane.rowIndex="6" GridPane.columnIndex="1">Admin:</Label>
|
||||
|
||||
<TextField fx:id="textLogin" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="textForename" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="textName" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<PasswordField fx:id="textPassword" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<PasswordField fx:id="textPasswordSecond" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="5" />
|
||||
<JFXTextField fx:id="textLogin" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<JFXTextField fx:id="textForename" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<JFXTextField fx:id="textName" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<JFXPasswordField fx:id="textPassword" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<JFXPasswordField fx:id="textPasswordSecond" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="5" />
|
||||
|
||||
<JFXToggleButton fx:id="checkButtonIsAdmin" GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||
|
||||
@ -51,8 +54,8 @@
|
||||
<HBox.margin>
|
||||
<Insets right="100" left="100"/>
|
||||
</HBox.margin>
|
||||
<Button onAction="#abortBtnClick">Abbrechen</Button>
|
||||
<Button onAction="#createUser" styleClass="btnLogin" >Anlegen</Button>
|
||||
<JFXButton onAction="#abortBtnClick">Abbrechen</JFXButton>
|
||||
<JFXButton onAction="#createUser" styleClass="btnLogin" >Anlegen</JFXButton>
|
||||
|
||||
</HBox>
|
||||
</GridPane>
|
||||
|
@ -1,10 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Alex Rechtin-->
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import com.jfoenix.controls.JFXToggleButton?>
|
||||
<?import com.jfoenix.controls.JFXTextField?>
|
||||
<?import com.jfoenix.controls.JFXPasswordField?>
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<GridPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="users.EditUserController">
|
||||
@ -36,11 +39,11 @@
|
||||
|
||||
<Label styleClass="inputLabelAdmin" GridPane.rowIndex="6" GridPane.columnIndex="1">Admin:</Label>
|
||||
|
||||
<TextField fx:id="textLogin" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="textForename" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="textName" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<PasswordField fx:id="textPassword" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<PasswordField fx:id="textPasswordSecond" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="5" />
|
||||
<JFXTextField fx:id="textLogin" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="1" />
|
||||
<JFXTextField fx:id="textForename" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||
<JFXTextField fx:id="textName" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="3" />
|
||||
<JFXPasswordField fx:id="textPassword" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<JFXPasswordField fx:id="textPasswordSecond" styleClass="textField" GridPane.columnIndex="2" GridPane.rowIndex="5" />
|
||||
|
||||
<JFXToggleButton fx:id="checkButtonIsAdmin" GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||
|
||||
@ -50,8 +53,8 @@
|
||||
<HBox.margin>
|
||||
<Insets right="100" left="100"/>
|
||||
</HBox.margin>
|
||||
<Button onAction="#abortBtnClick">Abbrechen</Button>
|
||||
<Button onAction="#createUser" styleClass="btnLogin" >Bearbeiten</Button>
|
||||
<JFXButton onAction="#abortBtnClick">Abbrechen</JFXButton>
|
||||
<JFXButton onAction="#createUser" styleClass="btnLogin" >Bearbeiten</JFXButton>
|
||||
|
||||
</HBox>
|
||||
</GridPane>
|
||||
|
Loading…
Reference in New Issue
Block a user