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

Mise à jour

parent b8e0e6b5
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,6 @@ public class Shukan ...@@ -38,7 +38,6 @@ public class Shukan
JPanel global = new JPanel(new BorderLayout()); JPanel global = new JPanel(new BorderLayout());
ShukanView canvas = new ShukanView (data, io); ShukanView canvas = new ShukanView (data, io);
ShukanViewBar mytoolbar = new ShukanViewBar(90); ShukanViewBar mytoolbar = new ShukanViewBar(90);
ShukanStudent student = new ShukanStudent(data,60);
// Getting the display size // Getting the display size
...@@ -49,11 +48,10 @@ public class Shukan ...@@ -49,11 +48,10 @@ public class Shukan
canvas.restrictSize ((int) (gcBounds.getWidth ()) - LEFT_MARGIN, canvas.restrictSize ((int) (gcBounds.getWidth ()) - LEFT_MARGIN,
(int) (gcBounds.getHeight ()) - TOP_MARGIN - mytoolbar.getHeight()); (int) (gcBounds.getHeight ()) - TOP_MARGIN - mytoolbar.getHeight());
mytoolbar.setSize(new Dimension((int) (gcBounds.getWidth ()) - LEFT_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) // Adding a openGL input handler (controller)
ShukanController myController = new ShukanController (canvas, mytoolbar, data, student); ShukanController myController = new ShukanController (canvas, mytoolbar, data);
canvas.addKeyListener (myController); canvas.addKeyListener (myController);
canvas.addMouseListener (myController); canvas.addMouseListener (myController);
mytoolbar.addActionListener(myController); mytoolbar.addActionListener(myController);
...@@ -77,11 +75,11 @@ public class Shukan ...@@ -77,11 +75,11 @@ public class Shukan
// Setting the window geometry // Setting the window geometry
global.add(mytoolbar, BorderLayout.NORTH); global.add(mytoolbar, BorderLayout.NORTH);
global.add (canvas, BorderLayout.CENTER); global.add (canvas, BorderLayout.CENTER);
global.add(student, BorderLayout.SOUTH); //global.add(student, BorderLayout.SOUTH);
frame.add(global); frame.add(global);
Insets ins = frame.getInsets (); Insets ins = frame.getInsets ();
frame.setSize (canvas.displayWidth () + ins.left + ins.right, frame.setSize (canvas.displayWidth () + ins.left + ins.right,
canvas.displayHeight ()+ mytoolbar.getHeight()+ student.getHeight() + ins.top + ins.bottom ); canvas.displayHeight ()+ mytoolbar.getHeight()+ ins.top + ins.bottom );
frame.setLocation (LEFT_MARGIN, 0); frame.setLocation (LEFT_MARGIN, 0);
frame.setBackground (Color.white); frame.setBackground (Color.white);
frame.setVisible (true); 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