Package TimeTable

Examples of TimeTable.Day


            DayOfWeek dof = DayOfWeek.createEurope(i);
            TimeOffset dayShiftBegin = swl.getTimeBegin(dof);
            TimeOffset dayShiftEnd = swl.getTimeEnd(dof);

            tt[i] = new JTimeTable(new Day(2007, 0, i + 1), sre, scaler);
            tt[i].setEnabled(false);
            tt[i].setShiftBegin(dayShiftBegin.getMilliseconds());
            tt[i].setShiftEnd(dayShiftEnd.getMilliseconds());
            tt[i].setCanExceed24(true);
View Full Code Here


        if(row == -1) {
            return;
        }
           
       try {
            Day day = new Day(year, month-1, row+1);

            SheduleExceptionData data = sel.getException(day.getCalendar().getTime());
            if(data == null) {
                data = new SheduleExceptionData(day);
            }
            TableExceptionCellDialog dlg =
                    new TableExceptionCellDialog(MainWindow.mainWindow, data, getAuditManager());

            dlg.setVisible(true);
            if(dlg.getDlgResult() == TableExceptionCellDialog.DLG_REMOVEEXCEPTION) {
                sel.removeException(day.getCalendar().getTime());
            } else if(dlg.getDlgResult() == ModalDialog.DLG_OK) {
                sel.setException(data);
            }
            table.updateUI();
           
View Full Code Here

                combo.addActionListener(this);
                return;
            }
           
            try {
                Day day = currentWeekIndex.getDay(dayOfWeek);
                SheduleProrumbleData data = spl.getProrumble(day);

                if (option == exceptionOption) {
                    WeekIndex planweekIndex = new WeekIndex(currentWeekIndex.getIndex() % sil.getWeekCount());
                    sil.copyWorksWithOverwrite(planweekIndex, dayOfWeek, currentWeekIndex, dayOfWeek);
                    if (data != null) {
                        spl.iterator(day.getYear(), day.getMonth() + 1).remove(data);
                    }
                } else if (option == planOption) {
                    sil.deleteWorks(currentWeekIndex, dayOfWeek);
                    if (data != null) {
                        spl.iterator(day.getYear(), day.getMonth() + 1).remove(data);
                    }
                } else {
                    /* prorumble*/
                    sil.deleteWorks(currentWeekIndex, dayOfWeek);
                    if (data == null) {
                        data = new SheduleProrumbleData(sil.getCollaborator());
                        data.setDay(day);
                        spl.iterator(day.getYear(), day.getMonth() + 1).append(data);
                    }
                    data.setType(option.getProrumbleType());
                }
                initNewTableModel(dayUI[dayOfWeek.getEuropean()],
                        currentWeekIndex, dayOfWeek, sil, spl);
View Full Code Here

            JLabel label = new JLabel(TimeLocal.WEEK[i]);
            label.setHorizontalAlignment(JLabel.CENTER);
            panel.add(label, BorderLayout.NORTH);
           
            tt[i] = new JTimeTable(new Day(2007, 0, i+1), model, sre, scaler);
            panel.add(tt[i]);
           
            if(!ableModify) {
                tt[i].setReadOnly(true);
            }
View Full Code Here

   
    @Override
    public Object getValueAt(int row, int col) {
        try {
            //SheduleDayInfo day = sel.getDayInfo(row+1, getTableMonth(), getTableYear());
            Day day = new Day(getTableYear(), getTableMonth()-1, row+1);

            if(col == COL_DATE) {
                return day.toString() + " " + day.getDayOfWeek().getShortTitle();
               
            } else if(col == COL_PLANNED) {
                SheduleHolidayData holiday = shl.getHoliday(day.getDay(), getTableMonth());
                if(holiday != null) {
                    return "Праздничный день: " + holiday.getDescription();
                }
                DayOfWeek dow = day.getDayOfWeek();
                TimeOffset timeBegin = swl.getTimeBegin(dow);
                TimeOffset timeEnd = swl.getTimeEnd(dow);
                if(timeBegin.getRaw() == 0) {
                    return "Выходной день";
                }
                return timeBegin + " - " + timeEnd;
               
            } else if(col == COL_EXCEPTION) {
                Date date = day.getCalendar().getTime();
                SheduleExceptionData exception = sel.getException(date);
                if(exception != null) {
                    return "Исключение: " + exception;
                }
                return "";
View Full Code Here

            this.year = year;
        }
       
        @Override
        protected void deleteDB(SheduleProrumbleData data) throws Exception {
            Day day = data.getDay();
            bean().removeProrumble(collaborator.getID(), day.getDay(), day.getMonth()+1, day.getYear());
        }
View Full Code Here

    private Cache<Day> day = new Cache<Day>();
   
    public SheduleProrumbleData(DirectoryCollaboratorItem collaborator) throws ClipsException {
        this(new ProrumbleDetails());
        getDetails().collID = collaborator.getID();
        setDay(new Day());
    }
View Full Code Here

        setDay(new Day());
    }
   
    public SheduleProrumbleData(ProrumbleDetails details) throws ClipsException {
        super(details);
        day.set(new Day(details.year, details.month-1, details.day));
    }
View Full Code Here

            ok = false;
        }

    txt += "<p><u>Дата открытия: </u>";
        if (dateTodayRadio.isSelected()) {
            Day day = new Day(today.getTimeInMillis());
            txt += day.toString() + "</p>";
        } else {
            Calendar cal = otherDate.getCalendar();
            if (cal != null) {
                Day day = new Day(cal.getTimeInMillis());
                txt += day.toString() + "</p>";
            } else {
                txt += undefined + "</p>";
                ok = false;
            }
        }


        txt += "<p><u>Длительность: </u>";
        Calendar cal = DCDateTill.getCalendar();
        if (cal != null) {
            Day day = new Day(cal.getTimeInMillis());
            txt += day.toString() + "</p>";
        } else {
            txt += undefined + "</p>";
            ok = false;
        }
        if (collaboratorClinicRadio.isSelected()) {
View Full Code Here

    public Day getDay(DayOfWeek dayOfWeek) {
        GregorianCalendar gc = (GregorianCalendar) GregorianCalendar.getInstance();
        gc.setTimeInMillis(mondayLocalUnixStamp);
        gc.add(GregorianCalendar.DAY_OF_YEAR, dayOfWeek.getEuropean());

        return new Day(gc.get(Calendar.YEAR), gc.get(Calendar.MONTH), gc.get(Calendar.DAY_OF_MONTH));       
    }
View Full Code Here

TOP

Related Classes of TimeTable.Day

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.