Merge remote-tracking branch 'origin/stefan'
# Conflicts: # src/main/resources/de/subway_surfers/vpr_app/layout.css
This commit is contained in:
commit
20db36e70e
@ -2,5 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,107 @@
|
||||
package de.subway_surfers.vpr_app;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Accordion;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.control.TitledPane;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BestelluebersichtMitarbeiter {
|
||||
|
||||
@FXML
|
||||
private ScrollPane scrollPane;
|
||||
|
||||
@FXML
|
||||
private Accordion accordion;
|
||||
|
||||
public void initialize() {
|
||||
|
||||
List<String> datum = new ArrayList<>();
|
||||
|
||||
datum.add("15.10.1999");
|
||||
datum.add("23.12.2002");
|
||||
datum.add("05.01.2020");
|
||||
|
||||
accordion.setStyle("-fx-box-border: transparent;");
|
||||
|
||||
for (String s : datum) {
|
||||
TitledPane datumUeberschrift = new TitledPane(s, createGerichtAkkordion());
|
||||
|
||||
datumUeberschrift.getStyleClass().add("titledPaneUeberschrift");
|
||||
datumUeberschrift.animatedProperty().set(false);
|
||||
datumUeberschrift.setPadding(new Insets(0, 0, 15, 0));
|
||||
|
||||
accordion.getPanes().add(datumUeberschrift);
|
||||
}
|
||||
|
||||
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
|
||||
scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
|
||||
}
|
||||
|
||||
private Accordion createGerichtAkkordion() {
|
||||
Accordion accordion = new Accordion();
|
||||
int anzahlGerichtA = 1;
|
||||
int anzahlGerichtB = 15;
|
||||
int anzahlGerichtC = 3;
|
||||
int anzahlGerichtD = 2;
|
||||
|
||||
double preisGerichtA = 4.99;
|
||||
double preisGerichtB = 9.99;
|
||||
double preisGerichtC = 3.99;
|
||||
double preisGerichtD = 12.49;
|
||||
|
||||
int anzahlNachtischA = 2;
|
||||
int anzahlNachtischB = 213;
|
||||
|
||||
double preisNachtischA = 0.49;
|
||||
double preisNachtischB = 99.49;
|
||||
|
||||
|
||||
if (anzahlGerichtA >= 1) {
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("GerichtA " + anzahlGerichtA + "-Mal " + preisGerichtA * anzahlGerichtA + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
if (anzahlGerichtB >= 1) {
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("GerichtB " + anzahlGerichtB + "-Mal " + preisGerichtB * anzahlGerichtB + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
if (anzahlGerichtC >= 1) {
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("GerichtC " + anzahlGerichtC + "-Mal " + preisGerichtC * anzahlGerichtC + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
if (anzahlGerichtD >= 1) {
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("GerichtD " + anzahlGerichtD + "-Mal " + preisGerichtD * anzahlGerichtD + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
if(anzahlNachtischA >= 1){
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("NachtischA " + anzahlNachtischA + "-Mal " + preisNachtischA * anzahlNachtischA + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
if(anzahlNachtischA >= 1){
|
||||
TitledPane tp = new TitledPane();
|
||||
tp.setText("NachtischB " + anzahlNachtischB + "-Mal " + preisNachtischB * anzahlNachtischB + " €");
|
||||
accordion.getPanes().addAll(tp);
|
||||
}
|
||||
|
||||
return accordion;
|
||||
}
|
||||
|
||||
public void onAbmelden(ActionEvent event) {
|
||||
VerwaltungApplication.sceneWechseln("login-view.fxml");
|
||||
}
|
||||
|
||||
}
|
@ -17,7 +17,7 @@ public class VerwaltungApplication extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("login-view.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("bestelluebersicht_mitarbeiter-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load());
|
||||
|
||||
stage.setWidth(960);
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<!-- Erstellt von Stefan Groß -->
|
||||
|
||||
<VBox prefHeight="400.0" prefWidth="600.0" stylesheets="@layout.css" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.subway_surfers.vpr_app.BestelluebersichtMitarbeiter">
|
||||
|
||||
<BorderPane styleClass="kopfzeile">
|
||||
<left>
|
||||
<Button fx:id="zurueck" text="Zurück"/>
|
||||
</left>
|
||||
<right>
|
||||
<Button fx:id="abmelden" text="Abmelden" onAction="#onAbmelden"/>
|
||||
</right>
|
||||
</BorderPane>
|
||||
|
||||
<ScrollPane fx:id="scrollPane" fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||
<padding>
|
||||
<Insets bottom="30.0" left="30.0" right="30.0" top="30.0" />
|
||||
</padding>
|
||||
<Accordion fx:id="accordion">
|
||||
</Accordion>
|
||||
</ScrollPane>
|
||||
|
||||
</VBox>
|
@ -29,6 +29,7 @@
|
||||
|
||||
.hauptmenue_wochenuebersicht{
|
||||
-fx-grid-lines-visible: true;
|
||||
-fx-grid-lines-visible: true;
|
||||
}
|
||||
|
||||
.hauptmenue_wochenuebersicht > *{
|
||||
@ -102,4 +103,10 @@
|
||||
|
||||
.links {
|
||||
-fx-rotate: 180;
|
||||
}
|
||||
.titledPaneUeberschrift > .title {
|
||||
-fx-pref-height: 50;
|
||||
-fx-padding: 10 10 16 10;
|
||||
-fx-font-size: 15;
|
||||
-fx-font-weight: bold;
|
||||
}
|
Loading…
Reference in New Issue
Block a user