Package net.sourceforge.ganttproject.calendar

Examples of net.sourceforge.ganttproject.calendar.GanttDaysOff


          person.setRole(role);
        }
        DateInterval[] intervals = myDaysOffModel.getIntervals();
      person.getDaysOff().clear();
        for (int i=0; i<intervals.length; i++) {
          person.addDaysOff(new GanttDaysOff(intervals[i].start, intervals[i].end));
        }
    }
View Full Code Here


        super.remove(interval);
      }
      };
      DefaultListModel daysOff = person.getDaysOff();
      for (int i=0; i<daysOff.getSize(); i++) {
        GanttDaysOff next = (GanttDaysOff) daysOff.get(i);
        myDaysOffModel.add(new DateIntervalListEditor.DateInterval(next.getStart().getTime(), next.getFinish().getTime()));
      }
      DateIntervalListEditor editor = new DateIntervalListEditor(myDaysOffModel);
      return editor;
    }
View Full Code Here

        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();
        for (int i = 0; i < resources.length; i++) {
            HumanResource p = (HumanResource) resources[i];
            if (p.getDaysOff() != null)
                for (int j = 0; j < p.getDaysOff().size(); j++) {
                    GanttDaysOff gdo = (GanttDaysOff) p.getDaysOff()
                            .getElementAt(j);
                    addAttribute("start", gdo.getStart().toXMLString(), attrs);
                    addAttribute("end", gdo.getFinish().toXMLString(), attrs);
                    addAttribute("resourceid", String.valueOf(p.getId()), attrs);
                    emptyElement("vacation", attrs, handler);
                }
        }
        endElement("vacations", handler);
View Full Code Here

            String endAsString = atts.getValue("end");
            String resourceIdAsString = atts.getValue("resourceid");
            HumanResource hr;
            hr = (HumanResource) myResourceManager.getById(Integer
                    .parseInt(resourceIdAsString));
            hr.addDaysOff(new GanttDaysOff(GanttCalendar
                    .parseXMLDate(startAsString), GanttCalendar
                    .parseXMLDate(endAsString)));
        } catch (NumberFormatException e) {
            System.out
                    .println("ERROR in parsing XML File year is not numeric: "
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.calendar.GanttDaysOff

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.