Skip to content
Snippets Groups Projects
Commit e9fb91d1 authored by CHEVALIER Noemy's avatar CHEVALIER Noemy
Browse files

ajout de l'affichage de la class ShukanStudent

parent aac7aecd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment