Compare commits
21 Commits
0100-Termi
...
ccaf6dbe62
Author | SHA1 | Date | |
---|---|---|---|
ccaf6dbe62 | |||
5a4a1e70e8 | |||
dc1b1643d8 | |||
6a40ebfcfc | |||
e3beeda254 | |||
6fe7cb06c1 | |||
2785c04d78 | |||
842a83af3b | |||
1900f83b45 | |||
18d5b528af | |||
af3ffe807c | |||
7b12642a66 | |||
95de4b5985 | |||
6971a42b39 | |||
23be5a1b91 | |||
8f3042c5f9 | |||
cb498b3062 | |||
8980a95c25 | |||
68275e1830 | |||
da7ff960e5 | |||
2537ca31ea |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -70,7 +70,5 @@ crashlytics-build.properties
|
||||
|
||||
# by github https://github.com/github/gitignore/blob/master/Java.gitignore
|
||||
|
||||
hellofx/.gradle/
|
||||
hellofx/app/build/
|
||||
hellofx/data/build/
|
||||
hellofx/.gradle/buildOutputCleanup/
|
||||
.gradle/
|
||||
build/
|
||||
|
@@ -1,6 +0,0 @@
|
||||
|
||||
.main-btn{
|
||||
-fx-background-color: #424242;
|
||||
-fx-text-fill: white;
|
||||
-fx-border-radius: 50em;
|
||||
}
|
@@ -13,7 +13,7 @@ public class MainApplication extends Application {
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(), 1200, 700);
|
||||
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("style.css")).toExternalForm());
|
||||
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("main-view.css")).toExternalForm());
|
||||
stage.setTitle("Hello!");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
|
@@ -1,13 +1,23 @@
|
||||
package client;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import res.Event;
|
||||
import res.DataController;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MainController {
|
||||
@FXML
|
||||
private GridPane calendarGrid;
|
||||
@@ -30,6 +40,23 @@ public class MainController {
|
||||
|
||||
@FXML
|
||||
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();
|
||||
Event[] eventList = dataController.getAllEvents();
|
||||
|
||||
@@ -40,4 +67,16 @@ public class MainController {
|
||||
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>
|
51
hellofx/app/src/main/resources/client/main-view.css
Normal file
51
hellofx/app/src/main/resources/client/main-view.css
Normal file
@@ -0,0 +1,51 @@
|
||||
GridPane{
|
||||
-fx-background-color: #2B2D42;
|
||||
}
|
||||
|
||||
.main-panel{
|
||||
-fx-background-color: #282C34;
|
||||
}
|
||||
|
||||
.vbox-main{
|
||||
-fx-background-color: #333333;
|
||||
-fx-alignment: top-center;
|
||||
|
||||
}
|
||||
|
||||
.gridCalendar Line{
|
||||
-fx-stroke: #B0B0B0;
|
||||
}
|
||||
|
||||
.gridCalender{
|
||||
-fx-background-color: #2B2D42;
|
||||
-fx-min-height: 80px;
|
||||
-fx-max-height: 80px;
|
||||
}
|
||||
|
||||
.labelMonth{
|
||||
-fx-padding: 0 0 0 20;
|
||||
-fx-background-color: #77859E;
|
||||
-fx-font-size: 35px;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
.labelDays{
|
||||
-fx-alignment: center;
|
||||
-fx-background-color: #525E74;
|
||||
-fx-font-size: 25px;
|
||||
}
|
||||
|
||||
Label{
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.main-btn{
|
||||
-fx-background-color: #ffffff;
|
||||
-fx-text-fill: white;
|
||||
-fx-background-radius: 5em;
|
||||
-fx-min-width: 40px;
|
||||
-fx-min-height: 40px;
|
||||
-fx-max-width: 40px;
|
||||
-fx-max-height: 40px;
|
||||
}
|
||||
|
@@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane gridLinesVisible="true" 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 hgrow="NEVER" maxWidth="60.0" minWidth="60.0" />
|
||||
<ColumnConstraints hgrow="ALWAYS" />
|
||||
@@ -14,109 +13,92 @@
|
||||
<rowConstraints>
|
||||
<RowConstraints vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0" style="-fx-background-color: #333333;">
|
||||
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0" style="-fx-background-color: #525E74;">
|
||||
<ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true">
|
||||
|
||||
</ImageView>
|
||||
<Button mnemonicParsing="false" onAction="#onAddBtnClick" prefHeight="50" prefWidth="50" styleClass="main-btn" text="ADD">
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;" textAlignment="CENTER" textFill="WHITE">
|
||||
<Button onAction="#onAddBtnClick" styleClass="main-btn">
|
||||
ADD
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</Button>
|
||||
<Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;" textAlignment="CENTER" textFill="WHITE">
|
||||
<Button onAction="#onAddBtnClick" styleClass="main-btn">
|
||||
ADD
|
||||
</Button>
|
||||
<Button onAction="#onAddBtnClick" styleClass="main-btn">
|
||||
ADD
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</Button>
|
||||
</VBox>
|
||||
<GridPane fx:id="calendarGrid" gridLinesVisible="true" GridPane.columnIndex="1">
|
||||
<GridPane prefHeight="200.0" prefWidth="222.0" GridPane.columnIndex="1" GridPane.rowIndex="0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="25.0" minHeight="25.0" vgrow="NEVER" />
|
||||
<RowConstraints maxHeight="25.0" minHeight="25.0" vgrow="NEVER" />
|
||||
<RowConstraints />
|
||||
<RowConstraints vgrow="ALWAYS" />
|
||||
</rowConstraints>
|
||||
<Label textFill="WHITE">
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelMonth" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0">
|
||||
Monat
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
|
||||
<Label textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="1">
|
||||
Mo
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
Di
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||
Mi
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="3" GridPane.rowIndex="1">
|
||||
Do
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="4" GridPane.rowIndex="1">
|
||||
Fr
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="5" GridPane.rowIndex="1">
|
||||
Sa
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label textFill="WHITE" GridPane.columnIndex="6" GridPane.rowIndex="1">
|
||||
So
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
|
||||
<VBox fx:id="vBoxMon" spacing="5.0" GridPane.columnIndex="0" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxTue" spacing="5.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxWen" spacing="5.0" GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxThu" spacing="5.0" GridPane.columnIndex="3" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxFri" spacing="5.0" GridPane.columnIndex="4" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxSat" spacing="5.0" GridPane.columnIndex="5" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<VBox fx:id="vBoxSun" spacing="5.0" GridPane.columnIndex="6" GridPane.rowIndex="2">
|
||||
|
||||
</VBox>
|
||||
<GridPane fx:id="calendarGrid" gridLinesVisible="true" styleClass="gridCalendar" GridPane.columnIndex="0" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="ALWAYS" maxWidth="14.2857142857" minWidth="14.2857142857" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
<ColumnConstraints hgrow="ALWAYS" percentWidth="14.2857142857" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="55.0" minHeight="25.0" vgrow="NEVER" />
|
||||
<RowConstraints percentHeight="-Infinity" vgrow="ALWAYS" />
|
||||
</rowConstraints>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="0">
|
||||
Montag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="1" GridPane.rowIndex="0">
|
||||
Dienstag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="2" GridPane.rowIndex="0">
|
||||
Mittwoch
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="3" GridPane.rowIndex="0">
|
||||
Donnerstag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="4" GridPane.rowIndex="0">
|
||||
Freitag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="5" GridPane.rowIndex="0">
|
||||
Samstag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="labelDays" textFill="WHITE" GridPane.columnIndex="6" GridPane.rowIndex="0">
|
||||
Sonntag
|
||||
<padding>
|
||||
<Insets left="5" />
|
||||
</padding>
|
||||
</Label>
|
||||
</GridPane>
|
||||
</GridPane>
|
||||
</GridPane>
|
||||
|
@@ -1,6 +0,0 @@
|
||||
|
||||
.main-btn{
|
||||
-fx-background-color: #424242;
|
||||
-fx-text-fill: white;
|
||||
-fx-border-radius: 50em;
|
||||
}
|
@@ -3,8 +3,8 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.0")
|
||||
implementation("com.fasterxml.jackson.core:jackson-core:2.13.0")
|
||||
implementation("com.fasterxml.jackson.core:jackson-annotations:2.13.0")
|
||||
val jacksonVersion = "2.13.0"
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
|
||||
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
|
||||
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
|
||||
}
|
||||
|
Reference in New Issue
Block a user