Package net.sourceforge.ganttproject.task.dependency

Examples of net.sourceforge.ganttproject.task.dependency.TaskDependencyConstraint


                        // for(int i=cpDependencies.size()-1; i >= 0; i--) {
                        TaskDependency td = ((TaskDependency) cpDependencies
                            .get(i));
                        Task dependee = td.getDependee();
                        Task dependant = td.getDependant();
                        TaskDependencyConstraint constraint = td
                                  .getConstraint();
                        for (int j = 0; j < allNodes.size(); j++) {
                          for (int k = 0; k < allNodes.size(); k++) {
                            if ((dependant
                                .equals((Task) (((DefaultMutableTreeNode) allNodes
                                    .get(j)).getUserObject())))
                                    && (dependee
                                        .equals((Task) (((DefaultMutableTreeNode) allNodes
                                            .get(k))
                                            .getUserObject())))) {
                              try {
                                TaskDependency newDependency = getTaskManager()
                                                  .getDependencyCollection()
                                                  .createDependency(
                                                      getTaskManager()
                                                                  .getTask(
                                                                        ((Integer) mapOriginalIDCopyID
                                                                                .get(new Integer(
                                                                                        dependant
                                                                                                .getTaskID())))
                                                                                .intValue()),
                                                        getTaskManager()
                                                                .getTask(
                                                                        ((Integer) mapOriginalIDCopyID
                                                                                .get(new Integer(
                                                                                        dependee
                                                                                                .getTaskID())))
                                                                                .intValue()),
                                                        getTaskManager()
                                                                .createConstraint(
                                                                        constraint
                                                                                .getID()));
                                          newDependency.setDifference(td
                                                  .getDifference());
                                          newDependency.setHardness(td.getHardness());
                                      } catch (TaskDependencyException e) {
View Full Code Here


                        .getTaskByUniqueID(mpxPredecessorTaskID.intValue());

                mpxRelation = mpxSuccessorTask
                        .addPredecessor(mpxPredecessorTask);

                TaskDependencyConstraint constraint = relationship
                        .getConstraint();
                switch (constraint.getID()) {
                case GanttTaskRelationship.SS: {
                    mpxRelation.setType(RelationType.START_START);
                    break;
                }
View Full Code Here

            int loadAsInt = Integer.parseInt(String.valueOf(value));
            dep.setDifference(loadAsInt);
            break;
        }
        case 2: {
            TaskDependencyConstraint clone;
            try {
                clone = (TaskDependencyConstraint) ((ConstraintImpl) value).clone();
            } catch (CloneNotSupportedException e) {
                throw new RuntimeException(e);
            }
View Full Code Here

            Map.Entry nextEntry = (Map.Entry) distances.next();
            List nextDependenciesList = (List) nextEntry.getValue();
            for (int i = 0; i < nextDependenciesList.size(); i++) {
                TaskDependency nextDependency = (TaskDependency) nextDependenciesList
                        .get(i);
                TaskDependencyConstraint nextConstraint = nextDependency
                        .getConstraint();
                TaskDependencyConstraint.Collision collision = nextConstraint
                        .getCollision();
                if (collision.isActive()) {
                    fulfilConstraints(nextDependency);
                    nextDependency.getDependant().applyThirdDateConstraint();
                }
View Full Code Here

    public TaskHierarchyManagerImpl getHierarchyManager() {
        return myHierarchyManager;
    }

    public TaskDependencyConstraint createConstraint(final int constraintID) {
        TaskDependencyConstraint result;
        switch (constraintID) {
        case GanttTaskRelationship.FS: {
            result = new FinishStartConstraintImpl();
            break;
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.task.dependency.TaskDependencyConstraint

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.