diff --git a/.vscode/launch.json b/.vscode/launch.json index bbb66eb..61d0a31 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,5 +1,19 @@ { "configurations": [ + { + "type": "java", + "name": "Launch GUI2", + "request": "launch", + "mainClass": "GUI.GUI2", + "projectName": "Lab15_OOP_79fdc875" + }, + { + "type": "java", + "name": "Launch GUI1", + "request": "launch", + "mainClass": "GUI.GUI1", + "projectName": "Lab15_OOP_79fdc875" + }, { "type": "java", "name": "Launch HesSoGarage", diff --git a/bin/BillGUI/BillGui$1$1.class b/bin/BillGUI/BillGui$1$1.class index b28fa7a..3897c85 100644 Binary files a/bin/BillGUI/BillGui$1$1.class and b/bin/BillGUI/BillGui$1$1.class differ diff --git a/bin/BillGUI/BillGui$1.class b/bin/BillGUI/BillGui$1.class index 59c85ae..af6dc64 100644 Binary files a/bin/BillGUI/BillGui$1.class and b/bin/BillGUI/BillGui$1.class differ diff --git a/bin/BillGUI/BillGui.class b/bin/BillGUI/BillGui.class index eb0dd1b..707547b 100644 Binary files a/bin/BillGUI/BillGui.class and b/bin/BillGUI/BillGui.class differ diff --git a/bin/BillGUI/ButtonListenerBill.class b/bin/BillGUI/ButtonListenerBill.class index 5a6bbaa..5bf7ed9 100644 Binary files a/bin/BillGUI/ButtonListenerBill.class and b/bin/BillGUI/ButtonListenerBill.class differ diff --git a/bin/BillGUI/ButtonListenerManager.class b/bin/BillGUI/ButtonListenerManager.class index a064d34..bbff05f 100644 Binary files a/bin/BillGUI/ButtonListenerManager.class and b/bin/BillGUI/ButtonListenerManager.class differ diff --git a/bin/BillGUI/HesSoGarage.class b/bin/BillGUI/HesSoGarage.class index ae13f61..4179702 100644 Binary files a/bin/BillGUI/HesSoGarage.class and b/bin/BillGUI/HesSoGarage.class differ diff --git a/bin/BillGUI/ManagerGui$1.class b/bin/BillGUI/ManagerGui$1.class index 4368c43..9db698e 100644 Binary files a/bin/BillGUI/ManagerGui$1.class and b/bin/BillGUI/ManagerGui$1.class differ diff --git a/bin/BillGUI/ManagerGui$2.class b/bin/BillGUI/ManagerGui$2.class index a6f9468..987e31b 100644 Binary files a/bin/BillGUI/ManagerGui$2.class and b/bin/BillGUI/ManagerGui$2.class differ diff --git a/bin/BillGUI/ManagerGui.class b/bin/BillGUI/ManagerGui.class index bc89d98..33ba8c4 100644 Binary files a/bin/BillGUI/ManagerGui.class and b/bin/BillGUI/ManagerGui.class differ diff --git a/bin/BillGUI/Row.class b/bin/BillGUI/Row.class index f5075da..58322f7 100644 Binary files a/bin/BillGUI/Row.class and b/bin/BillGUI/Row.class differ diff --git a/bin/GUI/ButtonListener.class b/bin/GUI/ButtonListener.class index 5e05f10..ba26bdc 100644 Binary files a/bin/GUI/ButtonListener.class and b/bin/GUI/ButtonListener.class differ diff --git a/bin/GUI/GUI1.class b/bin/GUI/GUI1.class index 095518a..3bdfed1 100644 Binary files a/bin/GUI/GUI1.class and b/bin/GUI/GUI1.class differ diff --git a/bin/GUI/GUI2.class b/bin/GUI/GUI2.class index c550513..7984315 100644 Binary files a/bin/GUI/GUI2.class and b/bin/GUI/GUI2.class differ diff --git a/bin/GUI/Listener.class b/bin/GUI/Listener.class index 7e3c259..59066c1 100644 Binary files a/bin/GUI/Listener.class and b/bin/GUI/Listener.class differ diff --git a/src/BillGUI/BillGui.java b/src/BillGUI/BillGui.java index d7e3b3d..aebb821 100644 --- a/src/BillGUI/BillGui.java +++ b/src/BillGUI/BillGui.java @@ -6,10 +6,17 @@ import javax.swing.*; import java.awt.print.*; import java.awt.image.BufferedImage; +/** + * generate the bill in a window + */ public class BillGui extends JFrame{ String bill; JPanel jP; + /** + * initialize the bill in a window + * @param bill string who contains the bill + */ BillGui(String bill){ this.bill = bill; @@ -20,17 +27,19 @@ public class BillGui extends JFrame{ FlowLayout fl = new FlowLayout(); this.setLayout(fl); + //Create the label who contain the label with the bill jP = new JPanel(); - JLabel jBill = new JLabel(bill); jP.add(jBill); - this.add(jP); + //Create the button for print the bill JButton buttonPrint = new JButton("Print"); - buttonPrint.addActionListener( - - new ButtonListenerBill(this) { + buttonPrint.addActionListener(new ButtonListenerBill(this) { + //TODO : describe the prozess to print and resize the bill + /** + * + */ @Override public void actionPerformed(ActionEvent e){ @@ -77,17 +86,19 @@ public class BillGui extends JFrame{ } /** - * + * listener to detect the button to print the bill */ class ButtonListenerBill implements ActionListener { JFrame Jf; - + /** + * initialize the listener + * @param Jf //TODO : do we always use the JFrame ? + */ ButtonListenerBill(JFrame Jf){ this.Jf = Jf; } - @Override - public void actionPerformed(ActionEvent e){ }; + public void actionPerformed(ActionEvent e){}; } diff --git a/src/BillGUI/HesSoGarage.java b/src/BillGUI/HesSoGarage.java index a3fee25..32e6e9a 100644 --- a/src/BillGUI/HesSoGarage.java +++ b/src/BillGUI/HesSoGarage.java @@ -2,9 +2,11 @@ package BillGUI; public class HesSoGarage { public static void main(String[] args) { + //Create a new garage GarageManager garageManager = new GarageManager(); String name = "
Garage manager