Compare commits
No commits in common. "62521c5b5c3aba0f8f62e1de5ea111d7f7610f97" and "4bc951b162618c4e068a37bd8bdd8f510e7ad756" have entirely different histories.
62521c5b5c
...
4bc951b162
@ -2,6 +2,5 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,107 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -14,7 +14,7 @@ public class VerwaltungApplication extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage) throws IOException {
|
public void start(Stage stage) throws IOException {
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("bestelluebersicht_mitarbeiter-view.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(VerwaltungApplication.class.getResource("login-view.fxml"));
|
||||||
Scene scene = new Scene(fxmlLoader.load());
|
Scene scene = new Scene(fxmlLoader.load());
|
||||||
|
|
||||||
stage.setWidth(960);
|
stage.setWidth(960);
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
<?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>
|
|
@ -61,9 +61,3 @@
|
|||||||
-fx-font-size: 30;
|
-fx-font-size: 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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