Examples of DayOfWeek


Examples of TimeTable.DayOfWeek

     * @param x - позиция курсора мыши
     * @param y - позиция курсора мыши
     */
    @Override
    public void contextMenu(JTimeTable table, int x, int y) {
        DayOfWeek dayOfWeek = table.getDay().getDayOfWeek();
        JPopupMenu popup = new JPopupMenu();

        JMenuItem menuItem = new JMenuItem("Добавить работу...");
        menuItem.addActionListener(new AddNewSpanAction(dayOfWeek));
        popup.add(menuItem);
View Full Code Here

Examples of TimeTable.DayOfWeek

            toScreen = option.toString();

        } else if (option == PanelSheduleIndividual.planOption
                    || option == PanelSheduleIndividual.exceptionOption) {
            try {
                DayOfWeek dayOfWeek = DayOfWeek.createEurope(columnIndex);
                Iterator<SheduleIndividualData> it;

                if (option == PanelSheduleIndividual.planOption) {
                    int week = currentWeekIndex.getIndex() % sil.getWeekCount();
                    it = sil.daySelector(new WeekIndex(week), dayOfWeek);
View Full Code Here

Examples of TimeTable.DayOfWeek

            } 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 "Выходной день";
                }
View Full Code Here

Examples of TimeTable.DayOfWeek

     */
    @Override
    public void contextMenu(JTimeTable table, int x, int y) {
        JPopupMenu popup = new JPopupMenu();
        JMenuItem menuItem = new JMenuItem("Добавить работу...");
        DayOfWeek dayOfWeek = table.getDay().getDayOfWeek();
        menuItem.addActionListener(new AddNewSpanAction(dayOfWeek));
        popup.add(menuItem);
        popup.show(table, x, y);
    }
View Full Code Here

Examples of TimeTable.DayOfWeek

        ruler.setFont(rulerLabel.getFont());

        for (int i = 0; i < dayUI.length; i++) {
            DayUI gui = new DayUI();
            dayUI[i] = gui;
            DayOfWeek dow = DayOfWeek.createEurope(i);

            JPanel panel = new JPanel();
            mainTimeTablePanel.add(panel);
            panel.setLayout(new BorderLayout());

            //HEAD
            {
                JPanel headPanel = new JPanel();
                panel.add(headPanel, BorderLayout.NORTH);
                headPanel.setLayout(new GridLayout(2, 1));

                gui.columnName = new JLabel(dow.getTitle());
                gui.columnName.setHorizontalAlignment(JLabel.CENTER);
                gui.columnName.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
                headPanel.add(gui.columnName);

                gui.comboBox = new JComboBox();
View Full Code Here

Examples of TimeTable.DayOfWeek

    private void switchToWeek(WeekIndex weekIndex,
            SheduleIndividualLocal sil, SheduleProrumbleLocal spl) throws ClipsException {
        System.out.println("Change week to " + weekIndex);

        for (int i = 0; i < 7; i++) {
            DayOfWeek dayOfWeek = DayOfWeek.createEurope(i);
            initNewTableModel(dayUI[i], weekIndex, dayOfWeek, sil, spl);

        }

        //GUI
View Full Code Here

Examples of TimeTable.DayOfWeek

        Calendar cal = calendar.getCalendar();
        int day = cal.get(Calendar.DAY_OF_MONTH);
        int month = cal.get(Calendar.MONTH);
        int year = cal.get(Calendar.YEAR);
        DayOfWeek dayOfWeek = DayOfWeek.create(cal);

        scaler = new TimeScalerTraditional(
                swl.getTimeBegin(dayOfWeek).getHours(),
                swl.getTimeEnd(dayOfWeek).getHours(), 0.2f);
        scaler.setMinHourHeight(hourScaler.getValue());
View Full Code Here

Examples of TimeTable.DayOfWeek

            throws ClipsException {
        Calendar cal = calendar.getCalendar();
        int day = cal.get(Calendar.DAY_OF_MONTH);
        int month = cal.get(Calendar.MONTH);
        int year = cal.get(Calendar.YEAR);
        DayOfWeek dayOfWeek = DayOfWeek.create(cal);

        scaler = new TimeScalerTraditional(
                swl.getTimeBegin(dayOfWeek).getHours(),
                swl.getTimeEnd(dayOfWeek).getHours(), 0.1f);
        scaler.setMinHourHeight(hourScaler.getValue());
View Full Code Here

Examples of ch.agent.t2.time.DayOfWeek

      month = 1;
      daysInPeriod = isLeap(year) ? 366 : 365;
    } else
      daysInPeriod = daysInMonth(year, month);
    TimeIndex t = new Day(year, month, 1);
    DayOfWeek firstOfPeriod = t.getDayOfWeek();
    int workRank = rank;
    if (workRank < 0)
      workRank = max; // try the max
    int week1Offset = name.ordinal() - firstOfPeriod.ordinal();
    if (week1Offset < 0)
      week1Offset += 7;
    int dayOfPeriod = 1 + week1Offset + (workRank - 1) * 7;
    if (rank < 0) {
      if (dayOfPeriod > daysInPeriod)
View Full Code Here

Examples of ch.agent.t2.time.DayOfWeek

      month = 1;
      daysInPeriod = isLeap(year) ? 366 : 365;
    } else
      daysInPeriod = daysInMonth(year, month);
    TimeIndex t = new Day(year, month, 1);
    DayOfWeek firstOfPeriod = t.getDayOfWeek();
    int workRank = rank;
    if (workRank < 0)
      workRank = max; // try the max
    int week1Offset = name.ordinal() - firstOfPeriod.ordinal();
    if (week1Offset < 0)
      week1Offset += 7;
    int dayOfPeriod = 1 + week1Offset + (workRank - 1) * 7;
    if (rank < 0) {
      if (dayOfPeriod > daysInPeriod)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.