Package com.projity.pm.calendar

Examples of com.projity.pm.calendar.WorkingHours


    //mpx.setUniqueID((int)workCalendar.getUniqueId());
  }
  public static  void toMpxCalendarDay(WorkDay day,ProjectCalendarHours mpxDay) {
    if  (day==null)
      return;
    WorkingHours workingHours=day.getWorkingHours();

    for (WorkRange range:(List<WorkRange>)workingHours.getIntervals()) { //claur
      if (range!=null)
        mpxDay.addRange(new DateRange(DateTime.fromGmt(range.getNormalizedStartTime()),DateTime.fromGmt(range.getNormalizedEndTime())));
    }
  }
View Full Code Here


  }

  public static  void toMpxExceptionDay(WorkDay day,ProjectCalendarException mpxDay) {
    if  (day==null)
      return;
    WorkingHours workingHours=day.getWorkingHours();
    WorkRange range;

    range=workingHours.getInterval(0);
    if (range!=null){
      mpxDay.addRange(new DateRange(DateTime.fromGmt(range.getNormalizedStartTime()),DateTime.fromGmt(range.getNormalizedEndTime()))); //claur
    }

    range=workingHours.getInterval(1);
    if (range!=null){
      mpxDay.addRange(new DateRange(DateTime.fromGmt(range.getNormalizedStartTime()),DateTime.fromGmt(range.getNormalizedEndTime())));//claur
    }

    range=workingHours.getInterval(2);
    if (range!=null){
      mpxDay.addRange(new DateRange(DateTime.fromGmt(range.getNormalizedStartTime()),DateTime.fromGmt(range.getNormalizedEndTime())));//claur
    }
  }
View Full Code Here

*/
public class OpenprojRangeConverter {
  public void to(WorkDay opDay, WorkRange range) {
    if (range == null)
      return;
    WorkingHours workingHours = new WorkingHours();
    if (opDay!= null){
      int i=0;
      for (TimeInterval interval : range.getIntervals()){
          try {
            workingHours.setInterval(i++,interval.getStart(), interval.getEnd());
          } catch (WorkRangeException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
      }
View Full Code Here

    updateView();

  }
  private void saveWorkingHoursChanges(boolean saveCalendar){
      try {
          WorkingHours hours=new WorkingHours();
          String startS,endS;
          for (int i=0;i<timeStart.length;i++){
              startS=timeStart[i].getText();
              endS=timeEnd[i].getText();
              if (startS!=null&&endS!=null&&startS.length()>0&&endS.length()>0){
                  hours.setInterval(i,parseTime(startS),parseTime(endS));
              } else{
                  if (startS.length()==0&&endS.length()==0)
                      break;
                  else{
                      Alert.warn(Messages.getString("Message.badTimeFormat"),this); //$NON-NLS-1$
View Full Code Here

TOP

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

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.