Package net.sourceforge.ganttproject.task

Examples of net.sourceforge.ganttproject.task.TaskContainmentHierarchyFacade


            task.setShape(new ShapePaint(4, 4, array, Color.white, task
                    .getColor()));
        }

        getManager().registerTask(task);
        TaskContainmentHierarchyFacade taskHierarchy = getManager()
                .getTaskHierarchy();
        myContext.setTaskID(task.getTaskID());
        Task lastTask = myStack.isEmpty() ? taskHierarchy.getRootTask()
                : (Task) myStack.peek();
        taskHierarchy.move(task, lastTask);
        myStack.push(task);
    }
View Full Code Here


        }
    }

    private boolean isPathExpanded(Task task) {
        boolean result = true;
        TaskContainmentHierarchyFacade taskHierarchy = getChartModel().getTaskManager().getTaskHierarchy();
        for (Task supertask = taskHierarchy.getContainer(task); supertask!=null && supertask!=getChartModel().getTaskManager().getRootTask(); supertask = taskHierarchy.getContainer(supertask)) {
            if (!supertask.getExpand()) {
                result = false;
                break;
            }
        }
View Full Code Here

  }

  private JCheckBox constructCheckBox () {
    boolean canBeProjectTask = true;
    boolean canBeMilestone = true;
    TaskContainmentHierarchyFacade taskHierarchy = myTaskManager.getTaskHierarchy();
    for (int i = 0 ; i < selectedTasks.length ; i++) {
      canBeMilestone &= !taskHierarchy.hasNestedTasks(selectedTasks[i]);
      canBeProjectTask &= canBeProjectTask(selectedTasks[i], taskHierarchy);
    }
    assert false==(canBeProjectTask && canBeMilestone);
    final JCheckBox result;
    if (canBeProjectTask) {
View Full Code Here

        else
            return new GraphicalNode(taskGraphNode);
    }

    private void correctPositionBecauseOfSuperTasks() {
        TaskContainmentHierarchyFacade hierarchy = myTaskManager
                .getTaskHierarchy();
        Task[] tasks = myTaskManager.getTasks();
        for (int i = 0; i < tasks.length; i++) {
            Task task = tasks[i];
            Task[] nestedTasks = hierarchy.getNestedTasks(task);
            correctPositions(nestedTasks);
        }
    }
View Full Code Here

    // recursive
    private void correctPositions(Task[] tasks) {
        if (tasks == null)
            return;
        TaskContainmentHierarchyFacade hierarchy = myTaskManager
                .getTaskHierarchy();
        for (int j = 0; j < tasks.length; j++) {
            Task nestedTask = tasks[j];
            GraphicalNode gn = getGraphicalNodeByID(nestedTask.getTaskID());
            int oldPosition = gn.col;
            changePosition(gn, oldPosition + 1);
            correctPositions(hierarchy.getNestedTasks(nestedTask));
        }
    }
View Full Code Here

            // treeTableModel.getCustomColumnCount();
            String newName = customColumn.getName();

            ((GanttTreeTableModel) ttModel).addCustomColumn(newName);

            TaskContainmentHierarchyFacade tchf = getProject().getTaskManager()
                    .getTaskHierarchy();
            setCustomColumnValueToAllNestedTask(tchf, tchf.getRootTask(),
                    customColumn.getName(), customColumn.getDefaultValue());

            TableColumnExt t = newTableColumnExt(nbCol);
            t.setMaxWidth(500);
            t.setHeaderValue(newName);
View Full Code Here

        // the column has to be displayed to be removed.
        this.displayColumn(name);

        deleteColumnFromUI(name);
        // Every tasks
        TaskContainmentHierarchyFacade tchf = Mediator
                .getGanttProjectSingleton().getTaskManager().getTaskHierarchy();
        tchf.getRootTask().getCustomValues().removeCustomColumn(name);
        removeCustomColumnToAllNestedTask(tchf, tchf.getRootTask(), name);

        Mediator.getGanttProjectSingleton().setAskForSave(true);
    }
View Full Code Here

        this.displayColumn(name);
        TableColumnExt tc = (TableColumnExt) getTable().getColumn(name);
        tc.setTitle(newName);
        tc.setIdentifier(newName);

        TaskContainmentHierarchyFacade tchf = Mediator
                .getGanttProjectSingleton().getTaskManager().getTaskHierarchy();
        tchf.getRootTask().getCustomValues().renameCustomColumn(name, newName);
        renameCustomColumnForAllNestedTask(tchf, tchf.getRootTask(), name,
                newName);
        ttModel.renameCustomColumn(name, newName);

        // newBB
        Iterator it = mapTableColumnColumnKeeper.keySet().iterator();
View Full Code Here

import net.sourceforge.ganttproject.task.Task;
import net.sourceforge.ganttproject.task.TaskContainmentHierarchyFacade;

public abstract class RecalculateTaskCompletionPercentageAlgorithm {
    public void run(Task task) {
        TaskContainmentHierarchyFacade facade = createContainmentFacade();
        recalculateSupertaskCompletionPercentageBottomUp(task, facade);
    }
View Full Code Here

      if (!isEnabled()) {
        return;
      }
      myDistance2dependencyList.clear();
        isRunning = true;
        TaskContainmentHierarchyFacade facade = createContainmentFacade();
        Set independentTasks = new HashSet();
        traverse(facade, facade.getRootTask(), independentTasks);
        for (Iterator it = independentTasks.iterator(); it.hasNext();) {
            Task next = (Task) it.next();
            buildDistanceGraph(next);
        }
        fulfilDependencies();
View Full Code Here

TOP

Related Classes of net.sourceforge.ganttproject.task.TaskContainmentHierarchyFacade

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.