OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 158 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 158 Rev 181
Line 41... Line 41...
41
    final JCheckBox preview = new JCheckBox("Aperçu");
41
    final JCheckBox preview = new JCheckBox("Aperçu");
42
    final JButton bPrint = new JButton("Imprimer");
42
    final JButton bPrint = new JButton("Imprimer");
43
    private static final double POINTS_PER_INCH = 72.0;
43
    private static final double POINTS_PER_INCH = 72.0;
44
 
44
 
45
    public CalendarPrintPanel(final OperationCalendarManager manager, final int week, final int year, final List<User> selectedUsers, final List<String> selectedStates) {
45
    public CalendarPrintPanel(final OperationCalendarManager manager, final int week, final int year, final List<User> selectedUsers, final List<String> selectedStates) {
-
 
46
 
-
 
47
        System.err.println("CalendarPrintPanel.CalendarPrintPanel()" + selectedUsers);
46
        preview.setSelected(true);
48
        preview.setSelected(true);
47
        //
49
        //
48
        this.setLayout(new GridBagLayout());
50
        this.setLayout(new GridBagLayout());
49
        final GridBagConstraints c = new DefaultGridBagConstraints();
51
        final GridBagConstraints c = new DefaultGridBagConstraints();
50
        final JLabel l = new JLabel("Date de début", SwingConstants.RIGHT);
52
        final JLabel l = new JLabel("Date de début", SwingConstants.RIGHT);
Line 107... Line 109...
107
                                return o1.getDtStart().compareTo(o2.getDtStart());
109
                                return o1.getDtStart().compareTo(o2.getDtStart());
108
                            }
110
                            }
109
                        });
111
                        });
110
                        final PageFormat pf = new PageFormat();
112
                        final PageFormat pf = new PageFormat();
111
                        pf.setPaper(new A4());
113
                        pf.setPaper(new A4());
-
 
114
                        List<JCalendarItem> itemsToWork = new ArrayList<>();
-
 
115
                        for (JCalendarItem item : itemInWeek) {
-
 
116
                            if (!item.hasFlag(ModuleOperation.FREE_TIME_FLAG)) {
-
 
117
                                itemsToWork.add(item);
-
 
118
                            }
-
 
119
                        }
-
 
120
 
112
                        final CalendarItemPrinter printable = new OperationCalendarItemPrinter(user.getFullName(), itemInWeek, pf);
121
                        final CalendarItemPrinter printable = new OperationCalendarItemPrinter(user.getFullName(), itemInWeek, pf, itemsToWork);
113
 
122
 
114
                        p.add(printable);
123
                        p.add(printable);
115
                    }
124
                    }
116
                }
125
                }
117
                if (p.isEmpty()) {
126
                if (p.isEmpty()) {