Package com.projity.pm.calendar

Examples of com.projity.pm.calendar.DayDescriptor


      calendar.setTimeInMillis(first);

      sdCalendar.setFlaggedDates(null);
        sdCalendar.setColorDates(null);

      DayDescriptor day;
      ArrayList flaggedDates=new ArrayList();
      ArrayList colorDates=new ArrayList();
      while(calendar.getTimeInMillis()<=last){
          day=service.getDay(wc,calendar.getTimeInMillis());
          if (day.isModified())
              flaggedDates.add(new Long(calendar.getTimeInMillis()));
          if (!day.isWorking())
              colorDates.add(new Long(calendar.getTimeInMillis()));
          calendar.add(Calendar.DATE,1);
      }


      if (flaggedDates.size()>0)
        sdCalendar.setFlaggedDates(toLongArray(flaggedDates));
      if (colorDates.size()>0)
        sdCalendar.setColorDates(toLongArray(colorDates));

      boolean colorWeekDates[] = new boolean[7];
      boolean flaggedWeekDates[] = new boolean[7];
      for (int i =0; i < 7; i++) {
        day = service.getWeekDay(wc,i+1);
        if (day.isModified())
          flaggedWeekDates[i] = true;
        if (!day.isWorking())
          colorWeekDates[i] = true;
      }
      sdCalendar.setColorWeekDates(colorWeekDates);
      sdCalendar.setFlaggedWeekDates(flaggedWeekDates);
     // updateWorkingHours();
View Full Code Here


     if (dirtyWorkingHours){
          saveWorkingHoursChanges(false);
      }

        DayDescriptor day=service.getDay(form.getCalendar(),sdCalendar.getSelectedFixedIntervals(),sdCalendar.getSelectedWeekDays());
        if (day==null){
//            System.out.println("none");
            ChangeWorkingTimeDialogBox.this.datesSetting.setSelected(ChangeWorkingTimeDialogBox.this.unknownWorkingTime.getModel(),true);
            setWorkingHours(null);
        }else if (!day.isModified()){
//            System.out.println("default");
            ChangeWorkingTimeDialogBox.this.datesSetting.setSelected(ChangeWorkingTimeDialogBox.this.defaultWorkingTime.getModel(),true);
            setWorkingHours(day.getWorkingHours());
        }else if (!day.isWorking()){
//            System.out.println("non working");
            ChangeWorkingTimeDialogBox.this.datesSetting.setSelected(ChangeWorkingTimeDialogBox.this.nonWorking.getModel(),true);
            setWorkingHours(null);
        }else{
//            System.out.println("working");
            ChangeWorkingTimeDialogBox.this.datesSetting.setSelected(ChangeWorkingTimeDialogBox.this.working.getModel(),true);
            setWorkingHours(day.getWorkingHours());
        }
        dirtyWorkingHours = true;
  }
View Full Code Here

TOP

Related Classes of com.projity.pm.calendar.DayDescriptor

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.