diff --git a/shukan/ShukanView.java b/shukan/ShukanView.java index 2fde8a221aa6aea5200e144e0bfbf951dc26f3db..4ce43d3c808b98242c40fe71c24eef2dc939334a 100644 --- a/shukan/ShukanView.java +++ b/shukan/ShukanView.java @@ -217,29 +217,26 @@ public class ShukanView extends JPanel /** Updates the application size. */ - private void adaptSize (int width, int height) - { - if (data != null) - { - nbWeeks = data.semesterSize (); - nbModules = data.numberOfModules (); + private void adaptSize(int width, int height) { + if (data != null) { + nbWeeks = data.semesterSize(); + nbModules = data.numberOfModules(); // Height - textHeight = (int) (height / (3.0f * (nbModules + 1))); - appliHeight = textHeight * 3 * (nbModules + 1); + textHeight = (int) (height / (3.0f * nbModules)); + appliHeight = textHeight * 3 * nbModules; // Width activWidth = width / (ShukanModule.MAX_ACTIV_PER_WEEK * (nbWeeks + 2)); weekWidth = activWidth * ShukanModule.MAX_ACTIV_PER_WEEK; appliWidth = weekWidth * (nbWeeks + 2); - } - else - { + } else { appliWidth = STD_APPLI_WIDTH; appliHeight = STD_APPLI_HEIGHT; } } + /** Displays the calendar grid background. */ private void displayCalendar (Graphics2D g2) @@ -307,18 +304,18 @@ public class ShukanView extends JPanel // Texts : semester and load name drawText (g2, 0, appliHeight - textHeight, 2 * weekWidth, textHeight, data.cursusName ()); - drawText (g2, 0, textHeight, - 2 * weekWidth, textHeight, data.loadName ()); + // drawText (g2, 0, textHeight, + // 2 * weekWidth, textHeight, data.loadName ()); // Texts : weeks int[] weekNumbers = data.weekNumbers (); for (int i = 0; i < nbWeeks; i++) { drawText (g2, (i + 2) * weekWidth, appliHeight - textHeight, weekWidth, textHeight, "S" + weekNumbers[i]); - drawText (g2, (i + 2) * weekWidth, textHeight, - weekWidth, textHeight, "" + data.computeLoad (i)); - drawText (g2, (2 + i) * weekWidth, 0, - weekWidth, textHeight, "/" + durations[i]); + // drawText (g2, (i + 2) * weekWidth, textHeight, + // weekWidth, textHeight, "" + data.computeLoad (i)); + // drawText (g2, (2 + i) * weekWidth, 0, + // weekWidth, textHeight, "/" + durations[i]); } // Texts : modules String[] modNames = data.moduleNames ();