From 21070c07be0dbf3a58c129fe719bda8303cbb8b5 Mon Sep 17 00:00:00 2001 From: Fastium <79766552+Fastium@users.noreply.github.com> Date: Thu, 19 May 2022 11:34:04 +0200 Subject: [PATCH] comment on managerGui --- bin/BillGUI/ButtonListenerManager.class | Bin 1184 -> 1184 bytes bin/BillGUI/ManagerGui$1.class | Bin 1996 -> 1996 bytes bin/BillGUI/ManagerGui$2.class | Bin 878 -> 878 bytes bin/BillGUI/ManagerGui.class | Bin 2665 -> 2665 bytes bin/BillGUI/Row.class | Bin 522 -> 522 bytes src/BillGUI/ManagerGui.java | 23 ++++++++++++----------- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/BillGUI/ButtonListenerManager.class b/bin/BillGUI/ButtonListenerManager.class index a064d34b3aa8c53f4d9dd26571536debac5f6c24..bbff05fa0048a979dc86111df302c25ae4d45727 100644 GIT binary patch delta 49 zcmZ3$xqx%SB4)v21{Q`A22O@j20n%|24RNs$(xz0IV*vpRY1||$>uChjCGT%SkwR= CcndxN delta 49 zcmZ3$xqx%SB4)uN1{Q{522O?&20n&T24RM>$(xz0IV*sol|a#|$>uChjJ1=iSkwR< Cp$jzt diff --git a/bin/BillGUI/ManagerGui$1.class b/bin/BillGUI/ManagerGui$1.class index 4368c43328603378f5bd0a76fb061307d0deb9b1..9db698e233eb9aec7f279926581a93609398c882 100644 GIT binary patch delta 51 zcmX@Ze};cUJR76cidpa_%*J81 zd&@Z|oKly%@YT6Vl{z&nLrnu4j}{}^#B`YAvZBixp929$dYtH!F(7Bi&72S8Cn0Yl jK8*RA{xOjXu{bQmV<{0EN!ZGa9VxI!fy}vF@9Omj^o18J delta 139 zcmaDU@=|1j24}rA0}F!y0~doJkQ8B%W)NjiV~}AmV31|7Vvu97XHa19XHaAaXHa2C zW>94)0?O7gs57)PXfRA*&|z4@pv$loNbd*gxXxh6@Q}fX;Wd!`mBEaWiNTyvlEI5n ljlrAIgdvpCnjwtQi6Mfak%56BhJllTfzg?vY4UQ;Ljc=h7SsR$ diff --git a/bin/BillGUI/Row.class b/bin/BillGUI/Row.class index f5075da54a1e88f87c03f2cbb7fb88a29040b95f..58322f72b990dbda07bd7fe936a8d0a5c02e1283 100644 GIT binary patch delta 25 gcmeBT>0;S%osl<%frTNJL4YBRL7E|b@)Jfi080;S%osl=0frTN3L4YBZL7E|L@)Jfi08-@!5dZ)H diff --git a/src/BillGUI/ManagerGui.java b/src/BillGUI/ManagerGui.java index b02f5aa..60520d9 100644 --- a/src/BillGUI/ManagerGui.java +++ b/src/BillGUI/ManagerGui.java @@ -6,7 +6,7 @@ import java.util.Vector; import javax.swing.*; /** - * + * HMI for calculate the bill */ public class ManagerGui extends JFrame { GridLayout grid; @@ -22,13 +22,17 @@ public class ManagerGui extends JFrame { /** - * + * initialize the window + * @param name name of the garage + * @param logoFilePath file of the garage's logo + * @param prestationsName array with the name of the prestations + * @param garageManager a new garage application */ public ManagerGui(String name, String logoFilePath, String[] prestationsName, GarageManager garageManager){ + //set up the window with the layout this.setSize(400,600); this.setLocation(600,200); this.setVisible(true); - grid = new GridLayout(prestationsName.length + 2,2); this.setLayout(grid); @@ -39,7 +43,6 @@ public class ManagerGui extends JFrame { this.add(Jname); this.add(Jlogo); - //Create rows for prestations for(String s : prestationsName){ prestations.add(new Row(s)); @@ -54,7 +57,7 @@ public class ManagerGui extends JFrame { JButton buttonBill = new JButton(buttonNameBill); buttonBill.addActionListener(new ButtonListenerManager(valuePrestations, prestations, garageManager){ /** - * + * add the number of prestations when it is used */ @Override public void actionPerformed(ActionEvent e){ @@ -66,7 +69,7 @@ public class ManagerGui extends JFrame { } System.out.println(value); } - + //Create the bill new BillGui(garageManager.generateHTMLBill(valuePrestations)); }; }); @@ -74,7 +77,7 @@ public class ManagerGui extends JFrame { JButton buttonQuit = new JButton(buttonNameQuit); buttonQuit.addActionListener(new ButtonListenerManager(this){ /** - * + * quit the window */ @Override public void actionPerformed(ActionEvent e){ @@ -84,18 +87,16 @@ public class ManagerGui extends JFrame { this.add(buttonBill); this.add(buttonQuit); - } } /** - * + * Create a row in the windows with a label and a spinner */ class Row { JLabel label; JSpinner spinner; - Row(String title){ label = new JLabel(title); spinner = new JSpinner(); @@ -103,7 +104,7 @@ class Row { } /** - * + * listener for detect the button */ class ButtonListenerManager implements ActionListener { JFrame Jf;