Package net.sf.mpxj

Examples of net.sf.mpxj.TimeUnit


                  Task task1 = m_file.getTaskByUniqueID(Integer.valueOf(taskID1));
                  Task task2 = m_file.getTaskByUniqueID(Integer.valueOf(taskID2));
                  if (task1 != null && task2 != null)
                  {
                     RelationType type = RelationType.getInstance(MPPUtility.getShort(data, 20));
                     TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 22));
                     Duration lag = MPPUtility.getDuration(MPPUtility.getInt(data, 24), durationUnits);
                     Relation relation = task2.addPredecessor(task1, type, lag);
                     m_file.fireRelationReadEvent(relation);
                  }
               }
View Full Code Here


                  case DURATION :
                  {
                     byte[] durationData = props.getByteArray(key);
                     double durationValueInHours = ((double) MPPUtility.getInt(durationData, 0)) / 600;
                     TimeUnit durationUnits;
                     if (durationData.length < 6)
                     {
                        durationUnits = TimeUnit.DAYS;
                     }
                     else
View Full Code Here

                  case DURATION :
                  {
                     byte[] durationData = props.getByteArray(key);
                     double durationValueInHours = ((double) MPPUtility.getInt(durationData, 0)) / 600;
                     TimeUnit durationUnits;
                     if (durationData.length < 6)
                     {
                        durationUnits = TimeUnit.DAYS;
                     }
                     else
View Full Code Here

                        Task task2 = m_file.getTaskByUniqueID(Integer.valueOf(taskID2));

                        if (task1 != null && task2 != null)
                        {
                           RelationType type = RelationType.getInstance(MPPUtility.getShort(data, 12));
                           TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 14));
                           Duration lag = MPPUtility.getAdjustedDuration(m_file, MPPUtility.getInt(data, 16), durationUnits);
                           Relation relation = task2.addPredecessor(task1, type, lag);
                           m_file.fireRelationReadEvent(relation);
                        }
                     }
View Full Code Here

      try
      {
         int lastIndex = dur.length() - 1;
         int index = lastIndex;
         double duration;
         TimeUnit units;

         while ((index > 0) && (Character.isDigit(dur.charAt(index)) == false))
         {
            --index;
         }
View Full Code Here

         try
         {
            String rate = m_fields[field];
            int index = rate.indexOf('/');
            double amount;
            TimeUnit units;

            if (index == -1)
            {
               amount = m_formats.getCurrencyFormat().parse(rate).doubleValue();
               units = TimeUnit.HOURS;
View Full Code Here

    * @param field the index number of the field to be retrieved
    * @return the value of the required field
    */
   public TimeUnit getTimeUnit(int field)
   {
      TimeUnit result;

      if ((field < m_fields.length) && (m_fields[field].length() != 0))
      {
         result = TimeUnit.getInstance(Integer.parseInt(m_fields[field]));
      }
View Full Code Here

TOP

Related Classes of net.sf.mpxj.TimeUnit

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.