Package TimeTable

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


            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

            } 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

     */
    @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

        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

    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

        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

            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

        GridLayout ga = new GridLayout(1, 7);
        mainTimeTablePanel.setLayout(ga);

        SimpleRectangleEngine sre = new SimpleRectangleEngine();

        DayOfWeek dayOfWeek = DayOfWeek.createEurope(0);

        TimeOffset shiftBegin = swl.getTimeBegin(dayOfWeek);
        TimeOffset shiftEnd = swl.getTimeEnd(dayOfWeek);
        ruler.setShiftBegin(shiftBegin.getMilliseconds());
        ruler.setShiftEnd(shiftEnd.getMilliseconds());

        TimeScaler scaler = new TimeScalerTraditional(
                shiftBegin.getHours(), shiftEnd.getHours(), 0.25f);
        scaler.setMinHourHeight(25);
        ruler.setScaler(scaler);

        ruler.setFont(rulerLabel.getFont());

        for (int i = 0; i < tt.length; i++) {
            JPanel panel = new JPanel();
            mainTimeTablePanel.add(panel);
            BorderLayout bl = new BorderLayout();
            panel.setLayout(bl);
            //bl.setVgap(10);

            JLabel label = new JLabel(TimeLocal.WEEK[i]);
            label.setHorizontalAlignment(JLabel.CENTER);
            label.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
            panel.add(label, BorderLayout.NORTH);

            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);
View Full Code Here

        SheduleTemplateTableModel model = new SheduleTemplateTableModel(sil, weekIndex, getAuditManager());
       
        boolean canChange = (sil == null) ? false : sil.canModifyPlan();
           
        for (int i = 0; i < 7; i++) {
            DayOfWeek dof = DayOfWeek.createEurope(i);
            TimeOffset dayShiftBegin = swl.getTimeBegin(dof);
            TimeOffset dayShiftEnd = swl.getTimeEnd(dof);

            tt[i].setDay(weekIndex.getDay(dof));
            tt[i].setShiftBegin(dayShiftBegin.getMilliseconds());
View Full Code Here

TOP

Related Classes of TimeTable.DayOfWeek

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.