From e9fb91d1aacac0cceb6c334f833eaa787f7570d7 Mon Sep 17 00:00:00 2001 From: CHEVALIER Noemy <noemy.chevalier7@etu.univ-lorraine.fr> Date: Sun, 28 May 2023 21:15:37 +0000 Subject: [PATCH] ajout de l'affichage de la class ShukanStudent --- shukan/Shukan.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shukan/Shukan.java b/shukan/Shukan.java index 55e5c5a..cfb3585 100644 --- a/shukan/Shukan.java +++ b/shukan/Shukan.java @@ -38,6 +38,8 @@ public class Shukan JPanel global = new JPanel(new BorderLayout()); ShukanView canvas = new ShukanView (data, io); ShukanViewBar mytoolbar = new ShukanViewBar(90); + ShukanStudent student = new ShukanStudent(data, io,60); + // Getting the display size GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment (); @@ -47,6 +49,8 @@ public class Shukan canvas.restrictSize ((int) (gcBounds.getWidth ()) - LEFT_MARGIN, (int) (gcBounds.getHeight ()) - TOP_MARGIN - mytoolbar.getHeight()); mytoolbar.setSize(new Dimension((int) (gcBounds.getWidth ()) - LEFT_MARGIN, mytoolbar.getHeight())); + student.setSize(new Dimension((int) (gcBounds.getWidth ()) - LEFT_MARGIN, student.getHeight())); + // Adding a openGL input handler (controller) ShukanController myController = new ShukanController (canvas, mytoolbar, data); @@ -73,10 +77,11 @@ public class Shukan // Setting the window geometry global.add(mytoolbar, BorderLayout.NORTH); global.add (canvas, BorderLayout.CENTER); + global.add(student, BorderLayout.SOUTH) frame.add(global); Insets ins = frame.getInsets (); frame.setSize (canvas.displayWidth () + ins.left + ins.right, - canvas.displayHeight ()+ mytoolbar.getHeight()+ ins.top + ins.bottom); + canvas.displayHeight ()+ mytoolbar.getHeight()+ student.getHeight() + ins.top + ins.bottom ); frame.setLocation (LEFT_MARGIN, 0); frame.setBackground (Color.white); frame.setVisible (true); -- GitLab