Compare commits
No commits in common. "654f34e30ebb63ae81f7a0e75d3b0887b1a56207" and "646da71e8a5527352b02f5f4225284d01c666876" have entirely different histories.
654f34e30e
...
646da71e8a
@ -16,12 +16,7 @@ application {
|
||||
mainClassName = "client.MainApplication"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.jfoenix:jfoenix:9.0.10")
|
||||
implementation(project(":data"))
|
||||
}
|
||||
|
||||
|
@ -1,30 +1,24 @@
|
||||
package main;
|
||||
|
||||
import com.jfoenix.controls.JFXTimePicker;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.util.StringConverter;
|
||||
import javafx.util.converter.LocalTimeStringConverter;
|
||||
import res.DataController;
|
||||
import res.Event;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.FormatStyle;
|
||||
import java.util.Locale;
|
||||
|
||||
public class CreateEventController {
|
||||
|
||||
@FXML
|
||||
public GridPane mainGrid;
|
||||
@FXML
|
||||
public DatePicker datePickerDate;
|
||||
@FXML
|
||||
public TextField textName;
|
||||
@FXML
|
||||
public TextField textStart;
|
||||
@FXML
|
||||
public TextField textEnd;
|
||||
@FXML
|
||||
public ComboBox<String> ComboBoxTyp;
|
||||
@FXML
|
||||
public ComboBox<String> ComboBoxPriotity;
|
||||
@ -34,10 +28,6 @@ public class CreateEventController {
|
||||
public CheckBox checkBoxIsPrivate;
|
||||
@FXML
|
||||
public Label labelError;
|
||||
@FXML
|
||||
public JFXTimePicker timeStart;
|
||||
@FXML
|
||||
public JFXTimePicker timeEnd;
|
||||
|
||||
|
||||
public CreateEventController() {
|
||||
@ -45,22 +35,6 @@ public class CreateEventController {
|
||||
|
||||
@FXML
|
||||
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(),
|
||||
checkBoxIsFullDay.isSelected(),
|
||||
checkBoxIsPrivate.isSelected(),
|
||||
timeStart.getValue().toString(),
|
||||
timeEnd.getValue().toString(),
|
||||
textStart.getText(),
|
||||
textEnd.getText(),
|
||||
datePickerDate.getValue().atStartOfDay(),
|
||||
(int) DataController.USER_ID
|
||||
);
|
||||
|
@ -148,23 +148,6 @@ public class MainController {
|
||||
});
|
||||
Button editBtn = new Button();
|
||||
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(deleteBtn);
|
||||
vBox.getChildren().add(btnHBox);
|
||||
|
@ -44,8 +44,3 @@ Label{
|
||||
-fx-wrap-text: true;
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
|
||||
.timePicker{
|
||||
-fx-background-color: white;
|
||||
-fx-max-width: 150px;
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
|
||||
<?import javafx.collections.FXCollections?>
|
||||
<?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">
|
||||
|
||||
<columnConstraints>
|
||||
@ -39,6 +39,8 @@
|
||||
|
||||
<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="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="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200">
|
||||
<items>
|
||||
|
46
client/app/src/main/resources/main/edit-event.css
Normal file
46
client/app/src/main/resources/main/edit-event.css
Normal 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;
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<?import javafx.collections.FXCollections?>
|
||||
<?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">
|
||||
|
||||
<columnConstraints>
|
||||
@ -39,6 +39,8 @@
|
||||
|
||||
<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="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="ComboBoxPriotity" GridPane.columnIndex="1" GridPane.rowIndex="6" maxWidth="200" minWidth="200">
|
||||
<items>
|
||||
|
Loading…
Reference in New Issue
Block a user