Compare commits
7 Commits
6a40ebfcfc
...
ccaf6dbe62
Author | SHA1 | Date | |
---|---|---|---|
ccaf6dbe62 | |||
5a4a1e70e8 | |||
dc1b1643d8 | |||
e3beeda254 | |||
6fe7cb06c1 | |||
2785c04d78 | |||
1900f83b45 |
@ -1,13 +1,23 @@
|
|||||||
package client;
|
package client;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
import javafx.stage.Modality;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import javafx.stage.StageStyle;
|
||||||
import res.Event;
|
import res.Event;
|
||||||
import res.DataController;
|
import res.DataController;
|
||||||
|
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MainController {
|
public class MainController {
|
||||||
@FXML
|
@FXML
|
||||||
private GridPane calendarGrid;
|
private GridPane calendarGrid;
|
||||||
@ -30,6 +40,23 @@ public class MainController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
protected void onAddBtnClick(){
|
protected void onAddBtnClick(){
|
||||||
|
try{
|
||||||
|
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
|
||||||
|
Scene scene = new Scene(fxmlLoader.load(), 650, 500);
|
||||||
|
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
|
||||||
|
Stage stage = new Stage();
|
||||||
|
stage.setTitle("Termin erstellen");
|
||||||
|
stage.setScene(scene);
|
||||||
|
stage.initModality(Modality.APPLICATION_MODAL);
|
||||||
|
stage.setResizable(false);
|
||||||
|
stage.initStyle(StageStyle.UNDECORATED);
|
||||||
|
stage.showAndWait();
|
||||||
|
}
|
||||||
|
catch (IOException e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DataController dataController = new DataController();
|
DataController dataController = new DataController();
|
||||||
Event[] eventList = dataController.getAllEvents();
|
Event[] eventList = dataController.getAllEvents();
|
||||||
|
|
||||||
@ -40,4 +67,16 @@ public class MainController {
|
|||||||
vBoxWen.getChildren().add(label);
|
vBoxWen.getChildren().add(label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
protected void createBtnClick(ActionEvent event){
|
||||||
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
protected void abortBtnClick(ActionEvent event){
|
||||||
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
||||||
|
stage.close();
|
||||||
|
}
|
||||||
}
|
}
|
35
hellofx/app/src/main/resources/client/create-event.css
Normal file
35
hellofx/app/src/main/resources/client/create-event.css
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
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;
|
||||||
|
}
|
46
hellofx/app/src/main/resources/client/create-event.fxml
Normal file
46
hellofx/app/src/main/resources/client/create-event.fxml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<?import com.sun.javafx.scene.control.DatePickerContent?>
|
||||||
|
<GridPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
||||||
|
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
|
</rowConstraints>
|
||||||
|
|
||||||
|
<Label styleClass="mainLabel">Termin anlegen</Label>
|
||||||
|
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="1">Datum:</Label>
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="2">Titel:</Label>
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="3">Zeit:</Label>
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="4">Typ:</Label>
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="5">Priorität:</Label>
|
||||||
|
<Label styleClass="inputLabel" GridPane.rowIndex="6">Ganztägig:</Label>
|
||||||
|
|
||||||
|
<DatePicker GridPane.columnIndex="1" GridPane.rowIndex="1" maxWidth="400" minWidth="400"/>
|
||||||
|
<TextField GridPane.columnIndex="1" GridPane.rowIndex="2" maxWidth="400" minWidth="400"/>
|
||||||
|
<DatePicker GridPane.columnIndex="1" GridPane.rowIndex="3" maxWidth="400" minWidth="400"/>
|
||||||
|
<ComboBox GridPane.columnIndex="1" GridPane.rowIndex="4" maxWidth="400" minWidth="400"/>
|
||||||
|
<ComboBox GridPane.columnIndex="1" GridPane.rowIndex="5" maxWidth="200" minWidth="200"/>
|
||||||
|
<CheckBox GridPane.columnIndex="1" GridPane.rowIndex="6"/>
|
||||||
|
|
||||||
|
<HBox GridPane.columnIndex="1" GridPane.rowIndex="7" GridPane.columnSpan="2" alignment="CENTER_RIGHT">
|
||||||
|
<Button onAction="#abortBtnClick" maxWidth="150" minWidth="150" >Abbrechen</Button>
|
||||||
|
<Button styleClass="mainButton" onAction="#createBtnClick" maxWidth="150" minWidth="150">Anlegen</Button>
|
||||||
|
</HBox>
|
||||||
|
|
||||||
|
</GridPane>
|
@ -5,7 +5,7 @@
|
|||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
<GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
<GridPane style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0" />
|
<ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
|
Loading…
Reference in New Issue
Block a user