Package com.projity.options

Examples of com.projity.options.CalendarOption


        setEnabledDocumentMenuActions(currentFrame!=null);
        setButtonState(null,currentFrame.getProject());
      }
      if (currentFrame != null && currentFrame.getProject() != null) {
        if (!Environment.isPlugin()) currentFrame.getFilterToolBarManager().transformBasedOnValue();
        CalendarOption calendarOption = currentFrame.getProject().getCalendarOption();

        if (calendarOption != null) {
          CalendarOption.setInstance(calendarOption);
        }
      } else {
View Full Code Here


      taskLinker.addTransformedObjects();
      taskLinker.addOutline(null);

      //dependencies
    // mpxj uses default options when importing link leads and lags
    CalendarOption oldOptions = CalendarOption.getInstance();
    CalendarOption.setInstance(CalendarOption.getDefaultInstance());

    int taskCount = 0;
    LinkedList voidTasksQueue=new LinkedList(); // we do not want to export nulls lines at end, so once all tasks done, stop
      for (Iterator i=project.getTaskOutline().iterator();i.hasNext();){
View Full Code Here

  public static int nameFieldWidth = Configuration.getFieldFromId("Field.name").getTextWidth();


  public static void toMPXOptions(ProjectHeader projectHeader) {

    CalendarOption calendarOption = CalendarOption.getInstance();
//    projectHeader.setDefaultHoursInDay(new Float(calendarOption.getHoursPerDay()));
    projectHeader.setMinutesPerDay(new Integer((int) (60 * calendarOption.getHoursPerDay())));
//    projectHeader.setDefaultHoursInWeek(new Float(calendarOption.getHoursPerWeek()));
    projectHeader.setMinutesPerWeek(new Integer((int) (60 * calendarOption.getHoursPerWeek())));

    projectHeader.setDaysPerMonth(new Integer((int) Math.round(calendarOption.getDaysPerMonth())));

    projectHeader.setDefaultStartTime(calendarOption.getDefaultStartTime().getTime());
    projectHeader.setDefaultEndTime(calendarOption.getDefaultEndTime().getTime());
  }
View Full Code Here

      mpxAssignment.setUnits(MathUtils.roundToDecentPrecision(assignment.getUnits()*100.0D));
      mpxAssignment.setRemainingWork(MPXConverter.toMPXDuration(assignment.getRemainingWork())); //2007
      long delay = Duration.millis(assignment.getDelay());
      if (delay != 0) {
        // mpxj uses default options when dealing with assignment delay
        CalendarOption oldOptions = CalendarOption.getInstance();
        CalendarOption.setInstance(CalendarOption.getDefaultInstance());

          mpxAssignment.setDelay(MPXConverter.toMPXDuration(assignment.getDelay()));
            CalendarOption.setInstance(oldOptions);
      }

      long levelingDelay = Duration.millis(assignment.getLevelingDelay());
      if (levelingDelay != 0) {
        // mpxj uses default options when dealing with assignment delay
        CalendarOption oldOptions = CalendarOption.getInstance();
        CalendarOption.setInstance(CalendarOption.getDefaultInstance());

          mpxAssignment.setDelay(MPXConverter.toMPXDuration(assignment.getLevelingDelay()));
            CalendarOption.setInstance(oldOptions);
      }
View Full Code Here

  protected Project project;
  public Object exportProject(Project in){
    return null;
  }
  protected void exportOptions(CalendarOptions options) {
    CalendarOption opOptions = CalendarOption.getInstance();
    CalendarOptions pOptions = project.getCalendarOptions();
    opOptions.setHoursPerDay(pOptions.getHoursPerDay());
    opOptions.setHoursPerWeek(pOptions.getHoursPerWeek());
    opOptions.setDaysPerMonth(pOptions.getDaysPerMonth());

    if (pOptions.getDefaultStart() > 0L){
      GregorianCalendar defaultStart = new GregorianCalendar();
      defaultStart.setTimeInMillis(pOptions.getDefaultStart());
      opOptions.setDefaultStartTime(defaultStart);
    }

    if (pOptions.getDefaultEnd() > 0L){
      GregorianCalendar defaultEnd = new GregorianCalendar();
      defaultEnd.setTimeInMillis(pOptions.getDefaultEnd());
      opOptions.setDefaultStartTime(defaultEnd);
    }
  }
View Full Code Here



  protected void importOptions() throws Exception{
    ProjectConverter converter=ProjectConverter.getInstance();
    CalendarOption openprojOptions=CalendarOption.getInstance();
    CalendarOptions options=plProject.getCalendarOptions();
    converter.convert("openproj", ProjectConverter.Type.OPTIONS, false, openprojOptions, options, state);
  }
View Full Code Here

   *
   * @throws Exception
   */
  public void importDependencies() throws Exception {
    // mpxj uses default options when importing link leads and lags, even when mpp format
    CalendarOption oldOptions = CalendarOption.getInstance();
    CalendarOption.setInstance(CalendarOption.getDefaultInstance());


    final OpenprojDependencyConverter converter=new OpenprojDependencyConverter();
    for (com.projectlibre.pm.tasks.Dependency plDependency : plProject.getDependencies()){
View Full Code Here

        setEnabledDocumentMenuActions(currentFrame!=null);
        setButtonState(null,currentFrame.getProject());
      }
      if (currentFrame != null && currentFrame.getProject() != null) {
        if (!Environment.isPlugin()) currentFrame.getFilterToolBarManager().transformBasedOnValue();
        CalendarOption calendarOption = currentFrame.getProject().getCalendarOption();

        if (calendarOption != null) {
          CalendarOption.setInstance(calendarOption);
        }
      } else {
View Full Code Here

       });

      options = new JButton(Messages.getString("ChangeWorkingTimeDialogBox.Options")); //$NON-NLS-1$
      options.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent e){
            CalendarOption option = project.getCalendarOption();
            if (option == null)
              option = CalendarOption.getInstance();
            CalendarDialogBox dialog = CalendarDialogBox.getInstance((Frame) ChangeWorkingTimeDialogBox.this.getOwner(),option);
            if (dialog.doModal()) {
              option = CalendarOption.getNewInstance();
View Full Code Here

TOP

Related Classes of com.projity.options.CalendarOption

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.