Skip to content

Commit

Permalink
TimeSettings
Browse files Browse the repository at this point in the history
Paramater solt und sznooze sind jetzt Objekt und keine Klassen Attribrute
  • Loading branch information
adiko01 committed May 5, 2023
1 parent 0fe71db commit c9f4a06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Eieruhr/src/de/adiko01/eieruhr/TimeSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class TimeSettings extends JDialog {

/** {@code int} des Slotes, welcher bearbeitet wird */
private static int slot;
private int slot;

/** Das Panel für den Inhalt */
private JPanel contentPanel = new JPanel();
Expand All @@ -40,30 +40,36 @@ public class TimeSettings extends JDialog {
private JLabel lbl_ERROR;

/** boolean, welcher angibt, ob ein sznooze Timer bearbeitet werden soll */
private static boolean sznooze = false;
private boolean sznooze = false;

/**Der starter für den Dialog
* @since 1.0
* @param args {@code [0]} die Ziffer (als String) für den Index der zu bearbeitenden Stelle <br>
* {@code [1]} die Ziffer der String {@code Sznooze}, wenn ein Sznoozetimer bearbeitet wird, ansonsten wird dies ignoriert
*/
public static void main(String[] args) {
slot = Integer.parseInt(args[0]);
TimeSettings dialog;
int Slot = Integer.parseInt(args[0]);
if (args[1].equalsIgnoreCase("Sznooze")) {
sznooze = true;
dialog = new TimeSettings(Slot, true);
} else {
dialog = new TimeSettings(Slot, false);
}
TimeSettings dialog = new TimeSettings();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
}

/**Der Konstruktor des Dialoges
* @since 1.0
*/
public TimeSettings() {
public TimeSettings(int Slot, boolean Sznooze) {
//This ist that
TimeSettings that = this;

//Übernehme Parameter
slot = Slot;
sznooze = Sznooze;

//Dieses Frame
setTitle(Config.TITLE);
setIconImage(Toolkit.getDefaultToolkit().getImage("pictures/timer.png"));
Expand Down
Binary file modified UML/Eieruhr-UML.pdf
Binary file not shown.
Binary file modified UML/Eieruhr-UML.vsdx
Binary file not shown.

0 comments on commit c9f4a06

Please sign in to comment.