Examples of adjustInsideCalendar()


Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

  /* (non-Javadoc)
   * @see com.projity.pm.scheduling.Schedule#moveInterval(java.lang.Object, long, long, com.projity.pm.scheduling.ScheduleInterval)
   */
  public void moveInterval(Object eventSource, long start, long end, ScheduleInterval oldInterval, boolean isChild) {
    WorkCalendar cal = getEffectiveWorkCalendar();
    start = cal.adjustInsideCalendar(start,false);
    boolean shifting = cal.compare(start,oldInterval.getStart(),false) != 0;
    long assignmentStart = getEarliestAssignmentStart();
    long amountFromStart = cal.compare(oldInterval.getStart(),assignmentStart,false); // possible that they are not the same but there is no working time between them
    if (shifting && amountFromStart == 0L) { // see if first bar shifted -The first bar is drawn from the first assignment and not from the task start.
      // To figure out the new task start, see how much the shift of this bar is, then apply that difference to the task start
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

        else
          newDetail().adjustRemainingDuration(remainingWork); // just set duration

      }
    } else {
      long start = cal.adjustInsideCalendar(context.getStart(),false);
      long end = cal.adjustInsideCalendar(context.getEnd(),true);
      if (end > start)
        setWorkInterval(start, end, work);
      if (getRate().getValue() == 0.0D) {// special case if units was 0
        double rate = ((double)work) / cal.compare(end,start,false); // use rate for the period as the assignment's rate
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

          newDetail().adjustRemainingDuration(remainingWork); // just set duration

      }
    } else {
      long start = cal.adjustInsideCalendar(context.getStart(),false);
      long end = cal.adjustInsideCalendar(context.getEnd(),true);
      if (end > start)
        setWorkInterval(start, end, work);
      if (getRate().getValue() == 0.0D) {// special case if units was 0
        double rate = ((double)work) / cal.compare(end,start,false); // use rate for the period as the assignment's rate
        this.forceUnits(rate);
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

  }

  private boolean addWorkingTimeIfRequired(long work,FieldContext context, boolean actual) {
    WorkCalendar cal = getEffectiveWorkCalendar();
    // adjust start and end inside the calendar
    long start = cal.adjustInsideCalendar(context.getStart(),false);
    long end = cal.adjustInsideCalendar(context.getEnd(),true);
    if (work != 0 && !verifyBounds(start,end))
      return false;

    // if adding during non calendar time
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

  private boolean addWorkingTimeIfRequired(long work,FieldContext context, boolean actual) {
    WorkCalendar cal = getEffectiveWorkCalendar();
    // adjust start and end inside the calendar
    long start = cal.adjustInsideCalendar(context.getStart(),false);
    long end = cal.adjustInsideCalendar(context.getEnd(),true);
    if (work != 0 && !verifyBounds(start,end))
      return false;

    // if adding during non calendar time
    if (end <= start && work != 0) {
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

//      System.out.println("before adding" + getWorkContour());
      addCalendarTime(start, end);
      cal = getEffectiveWorkCalendar();
      if (actual && getTask().getActualStart() == 0) {
        long taskStart = cal.adjustInsideCalendar(start, false);
        ((NormalTask)getTask()).setActualStartNoEvent(taskStart);
      }
      long addedDuration = cal.compare(end,start, false);
//      System.out.println("before shift" + getWorkContour());
      shift(start,end, addedDuration); // shift the remaining contour to the right by the duration of the inserted time
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

    if (type == ACTUAL_WORK || type == WORK || type == REMAINING_WORK) {
      if (value != 0 && !verifyBounds(start,end))
        return;
      if (Environment.isImporting()) {
        WorkCalendar cal = getEffectiveWorkCalendar();
        start = cal.adjustInsideCalendar(start,false);
        end = cal.adjustInsideCalendar(end,true);
      }

      setWorkInterval(start,end,value);
      if (type == ACTUAL_WORK && end > getStop() && value > 0.0D) // bug fix - actuals were lost
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

      if (value != 0 && !verifyBounds(start,end))
        return;
      if (Environment.isImporting()) {
        WorkCalendar cal = getEffectiveWorkCalendar();
        start = cal.adjustInsideCalendar(start,false);
        end = cal.adjustInsideCalendar(end,true);
      }

      setWorkInterval(start,end,value);
      if (type == ACTUAL_WORK && end > getStop() && value > 0.0D) // bug fix - actuals were lost
        setStop(end);
View Full Code Here

Examples of com.projity.pm.calendar.WorkCalendar.adjustInsideCalendar()

  /* (non-Javadoc)
   * @see com.projity.pm.scheduling.Schedule#moveInterval(java.lang.Object, long, long, com.projity.pm.scheduling.ScheduleInterval)
   */
  public void moveInterval(Object eventSource, long start, long end, ScheduleInterval oldInterval, boolean isChild) {
    WorkCalendar cal = getEffectiveWorkCalendar();
    start = cal.adjustInsideCalendar(start,false);
    boolean shifting = cal.compare(start,oldInterval.getStart(),false) != 0;
    long assignmentStart = getEarliestAssignmentStart();
    long amountFromStart = cal.compare(oldInterval.getStart(),assignmentStart,false); // possible that they are not the same but there is no working time between them
    if (shifting && amountFromStart == 0L) { // see if first bar shifted -The first bar is drawn from the first assignment and not from the task start.
      // To figure out the new task start, see how much the shift of this bar is, then apply that difference to the task start
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.