Package TimeTable

Examples of TimeTable.DayOfWeek


    @Override
    public String getColumnName(int column) {
        if (column == 0) {
            return "Неделя";
        }
        DayOfWeek dayOfWeek = DayOfWeek.createEurope(column - 1);
        return dayOfWeek.getTitle();
    }
View Full Code Here


    public Object getValueAt(int rowIndex, int col) {
        if (col == 0) {
            return "Неделя " + (rowIndex + 1);
        } else {
            try {
                DayOfWeek dayOfWeek = DayOfWeek.createEurope(col - 1);
                Iterator<SheduleIndividualData> it = sil.daySelector(new WeekIndex(rowIndex), dayOfWeek);
                String toScreen = "";
                if (swl.isWeekend(dayOfWeek)) {
                    toScreen += "Выходной день\n";
                }
View Full Code Here

        gc.set(2007, 0, 1, 0, 0, 0);
        gc.set(Calendar.MILLISECOND, 0);
       
        long point = gc.getTimeInMillis();
        for(int i=0; i<7; i++) {
            DayOfWeek dow = DayOfWeek.createEurope(i);
           
            if(!swl.isWeekend(dow)) {
                TimeOffset begin = swl.getTimeBegin(dow);
                TimeOffset end = swl.getTimeEnd(dow);
               
View Full Code Here

        return false;
    }
   
    @Override
    public void spanResized(TimeSpan span, JTimeTable table) {
        DayOfWeek dayOfWeek = getDayOfWeek(span);
        GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance();
        cal.set(2007, 0, dayOfWeek.getEuropean()+1, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
       
        TimeOffset timeBegin = new TimeOffset((int)((span.getBegin().getTime() - cal.getTimeInMillis()) / (60*1000)));
        swl.setWorkingDay(dayOfWeek, timeBegin, span.getLength());
  }
View Full Code Here

        swl.setWorkingDay(dayOfWeek, timeBegin, span.getLength());
  }

    @Override
    public void spanMoved(TimeSpan span, JTimeTable table) {
        DayOfWeek dayOfWeek = getDayOfWeek(span);
        GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance();
        cal.set(2007, 0, dayOfWeek.getEuropean()+1, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
       
        TimeOffset timeBegin = new TimeOffset((int)((span.getBegin().getTime() - cal.getTimeInMillis()) / (60*1000)));
        swl.setWorkingDay(dayOfWeek, timeBegin, span.getLength());
    }
View Full Code Here

     * @param span
     * @param table
     */
    @Override
    public void spanActivated(TimeSpan span, JTimeTable table) {
        DayOfWeek dayOfWeek = getDayOfWeek(span);
        showSpanDetails(dayOfWeek, span);
    }
View Full Code Here

     * @param x - позиция курсора мыши
     * @param y - позиция курсора мыши
     */
    @Override
    public void spanContextMenu(TimeSpan span, JTimeTable table, int x, int y) {
        DayOfWeek dayOfWeek = getDayOfWeek(span);
        GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance();
        cal.set(2007, 0, dayOfWeek.getEuropean()+1, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);

        JPopupMenu popup = new JPopupMenu();
        //details
        JMenuItem menuItem = new JMenuItem("Подробнее...");
View Full Code Here

     * @param x - позиция курсора мыши
     * @param y - позиция курсора мыши
     */
    @Override
    public void contextMenu(JTimeTable table, int x, int y) {
        DayOfWeek dayOfWeek = table.getDay().getDayOfWeek();
       
        if(spans[dayOfWeek.getEuropean()] == null) {
            JPopupMenu popup = new JPopupMenu();
            JMenuItem menuItem = new JMenuItem("Добавить время работы...");
            menuItem.addActionListener(new AddNewSpanAction(dayOfWeek));
            popup.add(menuItem);
            popup.show(table, x, y);
View Full Code Here

            String title = "Запись на прием:";
            data.put("clientFIO", "Пациент: " + item.getClient(am).toString());
            data.put("collabFIO", "Врач: " + item.getCollaborator().getTitle());
            data.put("date", "Дата: " + Converter.dateToString(item.getBegin()));
           
            DayOfWeek dayOfWeek = day.getDayOfWeek();
            SheduleIndividualLocal sil = new SheduleIndividualLocal(collaborator);           
            WeekIndex weekIndex = new WeekIndex(day);
           
            Iterator<SheduleIndividualData> it = sil.daySelector(weekIndex, dayOfWeek);
           
View Full Code Here

            return 7;
        }

        @Override
        public String getColumnName(int column) {
            DayOfWeek dayOfWeek = DayOfWeek.createEurope(column);
            return dayOfWeek.getTitle();
        }
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.