Compare commits

..

No commits in common. "654f34e30ebb63ae81f7a0e75d3b0887b1a56207" and "646da71e8a5527352b02f5f4225284d01c666876" have entirely different histories.

7 changed files with 59 additions and 62 deletions

View File

@ -16,12 +16,7 @@ application {
mainClassName = "client.MainApplication" mainClassName = "client.MainApplication"
} }
repositories {
mavenCentral()
}
dependencies { dependencies {
implementation("com.jfoenix:jfoenix:9.0.10")
implementation(project(":data")) implementation(project(":data"))
} }

View File

@ -1,30 +1,24 @@
package main; package main;
import com.jfoenix.controls.JFXTimePicker;
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.*; import javafx.scene.control.*;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.util.StringConverter;
import javafx.util.converter.LocalTimeStringConverter;
import res.DataController; import res.DataController;
import res.Event; import res.Event;
import java.time.LocalTime;
import java.time.format.FormatStyle;
import java.util.Locale;
public class CreateEventController { public class CreateEventController {
@FXML
public GridPane mainGrid;
@FXML @FXML
public DatePicker datePickerDate; public DatePicker datePickerDate;
@FXML @FXML
public TextField textName; public TextField textName;
@FXML @FXML
public TextField textStart;
@FXML
public TextField textEnd;
@FXML
public ComboBox<String> ComboBoxTyp; public ComboBox<String> ComboBoxTyp;
@FXML @FXML
public ComboBox<String> ComboBoxPriotity; public ComboBox<String> ComboBoxPriotity;
@ -34,10 +28,6 @@ public class CreateEventController {
public CheckBox checkBoxIsPrivate; public CheckBox checkBoxIsPrivate;
@FXML @FXML
public Label labelError; public Label labelError;
@FXML
public JFXTimePicker timeStart;
@FXML
public JFXTimePicker timeEnd;
public CreateEventController() { public CreateEventController() {
@ -45,22 +35,6 @@ public class CreateEventController {
@FXML @FXML
public void initialize() { public void initialize() {
StringConverter<LocalTime> defaultConverter = new LocalTimeStringConverter(FormatStyle.SHORT, Locale.GERMANY);
JFXTimePicker timePickerStart = new JFXTimePicker();
timeStart = timePickerStart;
timePickerStart.set24HourView(true);
timePickerStart.setConverter(defaultConverter);
timePickerStart.getStyleClass().add("timePicker");
mainGrid.add(timePickerStart, 1 , 3);
JFXTimePicker timePickerEnd = new JFXTimePicker();
timeEnd = timePickerEnd;
timePickerEnd.set24HourView(true);
timePickerEnd.setConverter(defaultConverter);
timePickerEnd.getStyleClass().add("timePicker");
mainGrid.add(timePickerEnd, 1 , 4);
} }
@ -76,8 +50,8 @@ public class CreateEventController {
ComboBoxPriotity.getSelectionModel().getSelectedIndex(), ComboBoxPriotity.getSelectionModel().getSelectedIndex(),
checkBoxIsFullDay.isSelected(), checkBoxIsFullDay.isSelected(),
checkBoxIsPrivate.isSelected(), checkBoxIsPrivate.isSelected(),
timeStart.getValue().toString(), textStart.getText(),
timeEnd.getValue().toString(), textEnd.getText(),
datePickerDate.getValue().atStartOfDay(), datePickerDate.getValue().atStartOfDay(),
(int) DataController.USER_ID (int) DataController.USER_ID
); );

View File

@ -148,23 +148,6 @@ public class MainController {
}); });
Button editBtn = new Button(); Button editBtn = new Button();
editBtn.setTextValue("edit"); editBtn.setTextValue("edit");
editBtn.setOnAction(event1 -> {
try {
FXMLLoader fxmlLoader = new FXMLLoader(
MainApplication.class.getResource("edit-event.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 650, 650);
scene.getStylesheets().add(Objects.requireNonNull(
MainApplication.class.getResource("create-event.css")).toExternalForm());
Stage stage = new Stage();
stage.setTitle("Termin bearbeiten");
stage.setScene(scene);
stage.initModality(Modality.APPLICATION_MODAL);
stage.setResizable(false);
stage.showAndWait();
} catch (IOException e) {
e.printStackTrace();
}
});
btnHBox.getChildren().add(editBtn); btnHBox.getChildren().add(editBtn);
btnHBox.getChildren().add(deleteBtn); btnHBox.getChildren().add(deleteBtn);
vBox.getChildren().add(btnHBox); vBox.getChildren().add(btnHBox);

View File

@ -44,8 +44,3 @@ Label{
-fx-wrap-text: true; -fx-wrap-text: true;
-fx-font-size: 16px; -fx-font-size: 16px;
} }
.timePicker{
-fx-background-color: white;
-fx-max-width: 150px;
}

View File

@ -5,7 +5,7 @@
<?import javafx.collections.FXCollections?> <?import javafx.collections.FXCollections?>
<?import java.lang.String?> <?import java.lang.String?>
<GridPane fx:id="mainGrid" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" <GridPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="main.CreateEventController"> fx:controller="main.CreateEventController">
<columnConstraints> <columnConstraints>
@ -39,6 +39,8 @@
<DatePicker fx:id="datePickerDate" GridPane.columnIndex="1" GridPane.rowIndex="1" maxWidth="400" minWidth="400"/> <DatePicker fx:id="datePickerDate" GridPane.columnIndex="1" GridPane.rowIndex="1" maxWidth="400" minWidth="400"/>
<TextField fx:id="textName" GridPane.columnIndex="1" GridPane.rowIndex="2" maxWidth="400" minWidth="400"/> <TextField fx:id="textName" GridPane.columnIndex="1" GridPane.rowIndex="2" maxWidth="400" minWidth="400"/>
<TextField fx:id="textStart" GridPane.columnIndex="1" GridPane.rowIndex="3" maxWidth="400" minWidth="400"/>
<TextField fx:id="textEnd" GridPane.columnIndex="1" GridPane.rowIndex="4" maxWidth="400" minWidth="400"/>
<ComboBox fx:id="ComboBoxTyp" GridPane.columnIndex="1" GridPane.rowIndex="5" maxWidth="400" minWidth="400"/> <ComboBox fx:id="ComboBoxTyp" GridPane.columnIndex="1" GridPane.rowIndex="5" maxWidth="400" minWidth="400"/>
<ComboBox fx:id="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200"> <ComboBox fx:id="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200">
<items> <items>

View File

@ -0,0 +1,46 @@
GridPane{
-fx-background-color: #3E415F;
-fx-padding: 20px;
-fx-font-size: 20px;
-fx-font-family: Segoe UI;
-fx-border-insets: 1;
-fx-border-color: #B0B0B0;
-fx-border-style: solid;
-fx-border-width: 2;
-fx-effect: dropshadow(three-pass-box, rgba(100, 100, 100, 1), 24, 0.5, 0, 0);
}
Label{
-fx-text-fill: white;
-fx-max-width: 150px;
-fx-min-width: 150px;
}
.mainLabel{
-fx-background-color: #8D99AE;
-fx-padding: 10px;
-fx-max-width: 200px;
-fx-min-width: 200px;
-fx-font-weight: bold;
-fx-alignment: center;
}
.inputField{
-fx-padding: 10px;
}
.mainButton{
-fx-font-weight: bold;
}
#labelError{
-fx-font-weight: bold;
-fx-max-width: 1000px;
-fx-text-fill: #ff5555;
-fx-padding: 16px;
-fx-min-height: 140px;
-fx-max-height: 400px;
-fx-wrap-text: true;
-fx-font-size: 16px;
}

View File

@ -2,10 +2,10 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.collections.FXCollections?> <?import javafx.collections.FXCollections?>
<?import java.lang.String?> <?import java.lang.String?>
<GridPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
<GridPane fx:id="mainGrid" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="main.CreateEventController"> fx:controller="main.CreateEventController">
<columnConstraints> <columnConstraints>
@ -39,6 +39,8 @@
<DatePicker fx:id="datePickerDate" GridPane.columnIndex="1" GridPane.rowIndex="1" maxWidth="400" minWidth="400"/> <DatePicker fx:id="datePickerDate" GridPane.columnIndex="1" GridPane.rowIndex="1" maxWidth="400" minWidth="400"/>
<TextField fx:id="textName" GridPane.columnIndex="1" GridPane.rowIndex="2" maxWidth="400" minWidth="400"/> <TextField fx:id="textName" GridPane.columnIndex="1" GridPane.rowIndex="2" maxWidth="400" minWidth="400"/>
<TextField fx:id="textStart" GridPane.columnIndex="1" GridPane.rowIndex="3" maxWidth="400" minWidth="400"/>
<TextField fx:id="textEnd" GridPane.columnIndex="1" GridPane.rowIndex="4" maxWidth="400" minWidth="400"/>
<ComboBox fx:id="ComboBoxTyp" GridPane.columnIndex="1" GridPane.rowIndex="5" maxWidth="400" minWidth="400"/> <ComboBox fx:id="ComboBoxTyp" GridPane.columnIndex="1" GridPane.rowIndex="5" maxWidth="400" minWidth="400"/>
<ComboBox fx:id="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200"> <ComboBox fx:id="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200">
<items> <items>