From d7870ecaf58a446568a80e8b6fbe12f9b3e10ff8 Mon Sep 17 00:00:00 2001
From: PaoloPinkel <eude365sup@outlook.com>
Date: Wed, 27 Nov 2019 14:14:25 +0100
Subject: [PATCH] =?UTF-8?q?Klassenvariablen=20eingef=C3=BChrt,=20MenuButto?=
 =?UTF-8?q?n=20Variablen=20umbenannt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pom.xml                                 |  6 +++
 src/main/java/Enigma/GuiController.java | 60 ++++++++++++++++++++++++-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ccec900..b89e09f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,6 +25,12 @@
             <artifactId>javafx-fxml</artifactId>
             <version>${use.javafx.version}</version>
         </dependency>
+        <!-- https://mvnrepository.com/artifact/net.sourceforge.plantuml/plantuml -->
+        <dependency>
+            <groupId>net.sourceforge.plantuml</groupId>
+            <artifactId>plantuml</artifactId>
+            <version>8059</version>
+        </dependency>
         <!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
         <dependency>
             <groupId>org.xerial</groupId>
diff --git a/src/main/java/Enigma/GuiController.java b/src/main/java/Enigma/GuiController.java
index ce8080c..67af4eb 100644
--- a/src/main/java/Enigma/GuiController.java
+++ b/src/main/java/Enigma/GuiController.java
@@ -259,10 +259,12 @@ public class GuiController2 {
         assert mBtnStartPos2 != null : "fx:id=\"a3\" was not injected: check your FXML file 'gui.fxml'.";
         assert mBtnStartPos3 != null : "fx:id=\"a2\" was not injected: check your FXML file 'gui.fxml'.";
         assert mBtnNotchPos1 != null : "fx:id=\"r1\" was not injected: check your FXML file 'gui.fxml'.";
+
     }
 
     /**
      * Setzt die Anzeige des entsprechende Gui-Element auf die entsprechende Walze
+     *  ->d.h. welche Walze sitzt auf welcher Position
      *
      * @param walze => gibt die Walzennummer an (entspricht
      * @param position => gibt die Position der Walze (entspricht
@@ -270,14 +272,70 @@ public class GuiController2 {
     public void setzeWalze(int walze, int position){
         switch (position){
             case 1:
-                mBtnWalzPos1.setText();
+                mBtnWalzPos1.setText(str[position]);
                 break;
             case 2:
+                mBtnWalzPos2.setText(str[position]);
                 break;
             case 3:
+                mBtnWalzPos3.setText(str[position]);
+                break;
+            default:
                 break;
         }
+    }
 
+    /**
+     * Setzt den Notch (position)=> die Mitnahmeposition der Walze (walze) fest
+     * Mitnahmeposition meint => die nächste Walze wird bei erreichen dieser Position (notch)
+     * um eine Stelle versetzt
+     *
+     * @param walze     => gibt die walze an
+     * @param position  => gibt den notch der Walze (walze) an
+     */
+    public void setzeRing(int walze, int position){
+        switch (walze){
+            case 1:
+                mBtnNotchPos1.setText(num[position]);
+                break;
+            case 2:
+                mBtnNotchPos2.setText(num[position]);
+                break;
+            case 3:
+                mBtnNotchPos3.setText(num[position]);
+                break;
+            default:
+                break;
+        }
+    }
 
+    /**
+     * Setzt die Startposition/ aktuelle Position der Walze
+     * @param walze => gibt die walze an
+     * @param buchstabe gibt den Startwert bzw die aktuelle Position der Walze (walze) an
+     */
+    public void setzePosition(int walze, char buchstabe){
+        switch (walze){
+            case 1:
+                mBtnStartPos1.setText(String.valueOf(buchstabe));
+                break;
+            case 2:
+                mBtnStartPos2.setText(buchstabe+"");
+                break;
+            case 3:
+                mBtnStartPos3.setText(buchstabe+"");
+                break;
+            default:
+                break;
+        }
     }
+
+    /**
+     * Setzt den aktuellen TagesSchluessel
+     * @param tagesSchluessel
+     */
+    public void setzeTagesSchluessel(String tagesSchluessel){
+
+    }
+
 }
-- 
GitLab