Available Methods
- setName ( )
- setFinish ( )
- setUniqueID ( )
- getStart ( )
- setStart ( )
- addPredecessor ( )
- setActualFinish ( )
- setDuration ( )
- setNotes ( )
- setEarlyFinish ( )
- setLateFinish ( )
- hasChildTasks ( )
- addResourceAssignment ( )
- setConstraintType ( )
- getFinish ( )
- getChildTasks ( )
- setActualStart ( )
- setLateStart ( )
- getName ( )
- setBaselineDuration ( )
- getActualFinish ( )
- getMilestone ( )
- setGUID ( )
- setPercentageComplete ( )
- getEarlyFinish ( )
- setMilestone ( )
- setRemainingDuration ( )
- addTask ( )
- setEarlyStart ( )
- setRemainingCost ( )
- getLateStart ( )
- getResourceAssignments ( )
- setPriority ( )
- setFreeSlack ( )
- setText ( )
- setConstraintDate ( )
- setHyperlink ( )
- getEarlyStart ( )
- setWBS ( )
- getWBS ( )
- getPredecessors ( )
- setExternalTask ( )
- getDuration ( )
- getBaselineDuration ( )
- getSummary ( )
- setCost ( )
- getExternalTask ( )
- setHyperlinkAddress ( )
- setPreleveledStart ( )
- setStop ( )
- setLevelingCanSplit ( )
- setLevelAssignments ( )
- getSubProject ( )
- setRecurring ( )
- setBaselineStart ( )
- getNotes ( )
- setLevelingDelay ( )
- getLateFinish ( )
- setFixedCostAccrual ( )
- setSubProject ( )
- getStartVariance ( )
- setActualCost ( )
- getRecurringTask ( )
- setCalendar ( )
- setFlag ( )
- setMarked ( )
- setID ( )
- setBaselineCost ( )
- setProject ( )
- setPhysicalPercentComplete ( )
- setEffortDriven ( )
- getActualStart ( )
- setPercentageWorkComplete ( )
- setRollup ( )
- getCachedValue ( )
- setNull ( )
- setBaselineWork ( )
- getCalendar ( )
Related Classes
- java.io.File
- java.util.Collections
- java.util.Date
- java.util.Iterator
- java.io.Serializable
- java.text.SimpleDateFormat
- java.io.ByteArrayOutputStream
- java.util.regex.Matcher
- java.util.Comparator
- java.util.UUID
- java.util.stream.Collectors
- java.util.Calendar
- java.util.Map.Entry
- java.text.ParseException
- java.math.BigDecimal
- java.util.TreeMap
- java.math.BigInteger
- java.text.DateFormat
- java.sql.SQLException
- java.text.DecimalFormat
- java.util.logging.Level
- com.google.common.collect.Lists
- com.google.common.collect.Maps
- java.text.MessageFormat
- com.google.common.base.Function
Java Code Examples for net.sf.mpxj.Task#setFreeSlack()
The following examples show how to use
net.sf.mpxj.Task#setFreeSlack() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PhoenixReader.java From mpxj with GNU Lesser General Public License v2.1 | 4 votes |
/** * Create a Task instance from a Phoenix activity. * * @param activity Phoenix activity data */ private void processActivity(Activity activity) { Task task = getParentTask(activity).addTask(); task.setText(1, activity.getId()); task.setActualDuration(activity.getActualDuration()); task.setActualFinish(activity.getActualFinish()); task.setActualStart(activity.getActualStart()); //activity.getBaseunit() //activity.getBilled() //activity.getCalendar() //activity.getCostAccount() task.setCreateDate(activity.getCreationTime()); task.setFinish(activity.getCurrentFinish()); task.setStart(activity.getCurrentStart()); task.setName(activity.getDescription()); task.setDuration(activity.getDurationAtCompletion()); task.setEarlyFinish(activity.getEarlyFinish()); task.setEarlyStart(activity.getEarlyStart()); task.setFreeSlack(activity.getFreeFloat()); task.setLateFinish(activity.getLateFinish()); task.setLateStart(activity.getLateStart()); task.setNotes(activity.getNotes()); task.setBaselineDuration(activity.getOriginalDuration()); //activity.getPathFloat() task.setPhysicalPercentComplete(activity.getPhysicalPercentComplete()); task.setRemainingDuration(activity.getRemainingDuration()); task.setCost(activity.getTotalCost()); task.setTotalSlack(activity.getTotalFloat()); task.setMilestone(activityIsMilestone(activity)); //activity.getUserDefined() task.setGUID(activity.getUuid()); if (task.getMilestone()) { if (activityIsStartMilestone(activity)) { task.setFinish(task.getStart()); } else { task.setStart(task.getFinish()); } } if (task.getDuration().getDuration() == 0) { // Phoenix normally represents the finish date as the start of the // day following the end of the activity. For example a 2 day activity // starting on day 1 would be shown in the PPX file as having a finish // date of day 3. We subtract one day to make the dates consistent with // all other schedule formats MPXJ handles. Occasionally for zero // duration tasks (which aren't tagged as milestones) the finish date // will be the same as the start date, so applying our "subtract 1" fix // gives us a finish date before the start date. The code below // deals with this situation. if (DateHelper.compare(task.getStart(), task.getFinish()) > 0) { task.setFinish(task.getStart()); } if (task.getActualStart() != null && task.getActualFinish() != null && DateHelper.compare(task.getActualStart(), task.getActualFinish()) > 0) { task.setActualFinish(task.getActualStart()); } } if (task.getActualStart() == null) { task.setPercentageComplete(Integer.valueOf(0)); } else { if (task.getActualFinish() != null) { task.setPercentageComplete(Integer.valueOf(100)); } else { Duration remaining = activity.getRemainingDuration(); Duration total = activity.getDurationAtCompletion(); if (remaining != null && total != null && total.getDuration() != 0) { double percentComplete = ((total.getDuration() - remaining.getDuration()) * 100.0) / total.getDuration(); task.setPercentageComplete(Double.valueOf(percentComplete)); } } } m_activityMap.put(activity.getId(), task); }