Updated login, main-wiew and the controllers

This commit is contained in:
Marco Kühn 2022-01-15 09:24:30 +01:00
parent 0893c4661e
commit 051000169e
5 changed files with 29 additions and 14 deletions

View File

@ -1,18 +1,18 @@
package users; package users;
import com.jfoenix.controls.*;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.stage.Stage; import javafx.stage.Stage;
import res.DataController; import res.DataController;
public class LoginController { public class LoginController {
@FXML @FXML
public TextField userField; public JFXTextField userField;
@FXML @FXML
public TextField passField; public JFXPasswordField passField;
@FXML @FXML
public Label userErrLabel; public Label userErrLabel;
@FXML @FXML

View File

@ -72,3 +72,7 @@ Label{
-fx-max-height: 40px; -fx-max-height: 40px;
} }
.navButtnon{
-fx-background-color: white;
}

View File

@ -4,6 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.image.*?> <?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import com.jfoenix.controls.*?>
<GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" <GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="main.MainController"> fx:controller="main.MainController">
@ -19,15 +20,15 @@
<ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true">
</ImageView> </ImageView>
<Button onAction="#onAddBtnClick" styleClass="main-btn"> <JFXButton onAction="#onAddBtnClick" styleClass="main-btn">
ADD ADD
</Button> </JFXButton>
<Button onAction="#onAddBtnClick" styleClass="main-btn"> <JFXButton onAction="#onAddBtnClick" styleClass="main-btn">
ADD ADD
</Button> </JFXButton>
<Button onAction="#onAddBtnClick" styleClass="main-btn"> <JFXButton onAction="#onAddBtnClick" styleClass="main-btn">
ADD ADD
</Button> </JFXButton>
</VBox> </VBox>
<GridPane prefHeight="200.0" prefWidth="222.0" GridPane.columnIndex="1" GridPane.rowIndex="0"> <GridPane prefHeight="200.0" prefWidth="222.0" GridPane.columnIndex="1" GridPane.rowIndex="0">
<columnConstraints> <columnConstraints>
@ -48,9 +49,9 @@
<Insets left="5"/> <Insets left="5"/>
</padding> </padding>
</Label> </Label>
<Button onAction="#onBackClick" GridPane.columnIndex="1" maxHeight="1.7976931348623157E308">zurück</Button> <JFXButton styleClass="navButton" onAction="#onBackClick" GridPane.columnIndex="1" maxHeight="1.7976931348623157E308">zurück</JFXButton>
<Button onAction="#onTodayClick" GridPane.columnIndex="2" maxHeight="1.7976931348623157E308">heute</Button> <JFXButton styleClass="navButton" GridPane.columnIndex="2" maxHeight="1.7976931348623157E308">heute</JFXButton>
<Button onAction="#onNextClick" GridPane.columnIndex="3" maxHeight="1.7976931348623157E308">weiter</Button> <JFXButton styleClass="navButton" GridPane.columnIndex="3" maxHeight="1.7976931348623157E308">weiter</JFXButton>
<GridPane fx:id="calendarGrid" gridLinesVisible="true" styleClass="gridCalendar" GridPane.columnSpan="4" <GridPane fx:id="calendarGrid" gridLinesVisible="true" styleClass="gridCalendar" GridPane.columnSpan="4"
GridPane.columnIndex="0" GridPane.rowIndex="1"> GridPane.columnIndex="0" GridPane.rowIndex="1">

View File

@ -35,3 +35,11 @@ Label{
-fx-wrap-text: true; -fx-wrap-text: true;
-fx-font-size: 16px; -fx-font-size: 16px;
} }
.userField{
-fx-background-color: white;
}
.passField{
-fx-background-color: white;
}

View File

@ -2,6 +2,8 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import com.jfoenix.controls.*?>
<GridPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="users.LoginController"> <GridPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="users.LoginController">
<columnConstraints> <columnConstraints>
@ -19,11 +21,11 @@
<Label GridPane.columnIndex="1">Anmelden</Label> <Label GridPane.columnIndex="1">Anmelden</Label>
<Label GridPane.rowIndex="1">Username</Label> <Label GridPane.rowIndex="1">Username</Label>
<TextField GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="userField"/> <JFXTextField GridPane.columnIndex="1" GridPane.rowIndex="1" fx:id="userField"/>
<Label styleClass="errorLbl" GridPane.columnIndex="2" GridPane.rowIndex="1" fx:id="userErrLabel"/> <Label styleClass="errorLbl" GridPane.columnIndex="2" GridPane.rowIndex="1" fx:id="userErrLabel"/>
<Label GridPane.rowIndex="2">Paswort</Label> <Label GridPane.rowIndex="2">Paswort</Label>
<PasswordField GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="passField"/> <JFXPasswordField GridPane.columnIndex="1" GridPane.rowIndex="2" fx:id="passField"/>
<Label styleClass="errorLbl" GridPane.columnIndex="2" GridPane.rowIndex="2" fx:id="passErrLabel"/> <Label styleClass="errorLbl" GridPane.columnIndex="2" GridPane.rowIndex="2" fx:id="passErrLabel"/>
<Button onAction="#abortBtnClick" GridPane.columnIndex="1" GridPane.rowIndex="3">Beenden</Button> <Button onAction="#abortBtnClick" GridPane.columnIndex="1" GridPane.rowIndex="3">Beenden</Button>