filled scene 'create-event' with live
This commit is contained in:
parent
1900f83b45
commit
2785c04d78
@ -1,5 +1,6 @@
|
|||||||
GridPane{
|
GridPane{
|
||||||
-fx-background-color: #282C34;
|
-fx-background-color: #282C34;
|
||||||
|
-fx-margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label{
|
Label{
|
||||||
|
@ -2,6 +2,7 @@ package client;
|
|||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Node;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
@ -12,6 +13,7 @@ import javafx.stage.Stage;
|
|||||||
import res.Event;
|
import res.Event;
|
||||||
import res.DataController;
|
import res.DataController;
|
||||||
|
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -39,12 +41,13 @@ public class MainController {
|
|||||||
protected void onAddBtnClick(){
|
protected void onAddBtnClick(){
|
||||||
try{
|
try{
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
|
||||||
Scene scene = new Scene(fxmlLoader.load(), 600, 400);
|
Scene scene = new Scene(fxmlLoader.load(), 700, 500);
|
||||||
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
|
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
|
||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
stage.setTitle("Termin erstellen");
|
stage.setTitle("Termin erstellen");
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
stage.initModality(Modality.APPLICATION_MODAL);
|
stage.initModality(Modality.APPLICATION_MODAL);
|
||||||
|
stage.setResizable(false);
|
||||||
stage.showAndWait();
|
stage.showAndWait();
|
||||||
}
|
}
|
||||||
catch (IOException e){
|
catch (IOException e){
|
||||||
@ -62,4 +65,10 @@ 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();
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,3 +1,25 @@
|
|||||||
GridPane{
|
GridPane{
|
||||||
-fx-background-color: #3E415F;
|
-fx-background-color: #3E415F;
|
||||||
|
-fx-padding: 20px;
|
||||||
|
-fx-font-size: 20px;
|
||||||
|
-fx-font-family: Segoe UI;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
@ -1,11 +1,43 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import java.lang.*?>
|
|
||||||
<?import java.util.*?>
|
|
||||||
<?import javafx.scene.*?>
|
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
<GridPane>
|
<GridPane xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController">
|
||||||
<Label>Terminerstellen</Label>
|
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
<ColumnConstraints/>
|
||||||
|
<ColumnConstraints halignment="RIGHT"/>
|
||||||
|
</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="2" GridPane.rowIndex="1" maxWidth="300" minWidth="300"/>
|
||||||
|
<TextField GridPane.columnIndex="2" GridPane.rowIndex="2" maxWidth="300" minWidth="300"/>
|
||||||
|
<DatePicker GridPane.columnIndex="2" GridPane.rowIndex="3" maxWidth="300" minWidth="300"/>
|
||||||
|
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="4" maxWidth="300" minWidth="300"/>
|
||||||
|
<ComboBox GridPane.columnIndex="2" GridPane.rowIndex="5" maxWidth="100" minWidth="100"/>
|
||||||
|
<CheckBox GridPane.columnIndex="2" GridPane.rowIndex="6"/>
|
||||||
|
|
||||||
|
<Button GridPane.columnIndex="3" GridPane.rowIndex="7" onAction="#createBtnClick" >Anlegen</Button>
|
||||||
|
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
GridPane{
|
GridPane{
|
||||||
-fx-background-color: #282C34;
|
-fx-background-color: #282C34;
|
||||||
|
-fx-margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label{
|
Label{
|
||||||
|
Loading…
Reference in New Issue
Block a user