Examples of TaskNode


Examples of net.sourceforge.ganttproject.task.TaskNode

        // task.setColor(current.getColor());
        // }
        // if (current.shapeDefined())
        // task.setShape(current.getShape());
        // }
        TaskNode taskNode = tree.addObject(task, node, index);

        /*
         * this will add new custom columns to the newly created task.
         */
        getCustomColumnsStorage().processNewTask(task);
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

        GanttCalendar end = null;
        while (en.hasMoreElements()) {
            Object next = en.nextElement();
            if(!(next instanceof TaskNode))
                continue;
            TaskNode tn = (TaskNode) next;
            if (tn.isRoot())
                continue;
            GanttCalendar tnEnd = tn.getEnd();
            if (end == null || end.before(tnEnd)) {
                res.clear();
                end = tnEnd.Clone();
                res.add(tn.getUserObject());
            } else if (end.compareTo(tnEnd) == 0)
                res.add(tn.getUserObject());
        }
        return res;
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

    case 9:
      return String.class;
    case 10:
      return Integer.class;
    default: {
      TaskNode tn = (TaskNode) this.getRoot();
      // tn = (TaskNode)tn.children().nextElement();
      Object o = this.getValueAt(tn, column);
      if (o == null) {
        o = "erreur";
        System.err.println("!!!!!!!!!!!!!!!!!");
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

   */
  public Object getValueAt(Object node, int column) {
    Object res = null;
    if (!(node instanceof TaskNode))
      return null;
    TaskNode tn = (TaskNode) node;
    Task t = (Task) tn.getUserObject();
    // if(tn.getParent()!=null){
    switch (column) {
    case 0:
      if (((Task) tn.getUserObject()).isProjectTask()) {
        res = new ImageIcon(getClass().getResource(
            "/icons/mproject.gif"));
      } else if (!tn.isLeaf())
        res = new ImageIcon(getClass().getResource("/icons/mtask.gif"));
      else if (t.isMilestone())
        res = new ImageIcon(getClass()
            .getResource("/icons/meeting.gif"));
      else
        res = new ImageIcon(getClass().getResource("/icons/tasks2.png"));
      break;
    case 1:
      Task task = (Task) tn.getUserObject();
      String path = (task.getPriority() == 0 ? "/icons/task1.gif" : task
          .getPriority() == 1 ? "/icons/task.gif"
          : "/icons/task2.gif");
      res = new ImageIcon(getClass().getResource(path));
      break;
    case 2: // info
      TaskInfo info = t.getTaskInfo();
      if (info != null) {
        if (info instanceof Delay) {
          int type = ((Delay) info).getType();
          if (type == Delay.NORMAL)
            res = new ImageIcon(getClass().getResource(
                "/icons/alert1_16.gif"));
          else if (type == Delay.CRITICAL)
            res = new ImageIcon(getClass().getResource(
                "/icons/alert2_16.gif"));
        }
      }
      break;
    case 3:
      res = tn.getName();
      break;
    case 4:
      res = tn.getStart();
      break;
    case 5:
      res = tn.getEnd();
      break;
    case 6:
      res = new Integer(tn.getDuration());
      break;
    case 7:
      res = new Integer(tn.getCompletionPercentage());
      break;
    case 8: {
      ResourceAssignment[] tAssign = t.getAssignments();
      StringBuffer sb = new StringBuffer();
      int nb = 0;
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

  /**
   * @inheritDoc
   */
  public Task[] getNestedTasks(Task container) {
    TaskNode r = (TaskNode) root;
    Enumeration e = r.children();

    Vector v = new Vector();
    while (e.hasMoreElements())
      v.add((TaskNode) e.nextElement());
    Task[] res = new Task[v.size()];
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

  /**
   * Purpose: Should return true if this Tasks has any nested subtasks.
   */
  public boolean hasNestedTasks(Task container) {
    TaskNode r = (TaskNode) root;
    if (r.getChildCount() > 0) {
      return true;
    } else {
      return false;
    }
  }
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

    Enumeration enumeration = ((TaskNode) getRoot()).preorderEnumeration();
    while (enumeration.hasMoreElements()) {
      Object next = enumeration.nextElement();
      if (!(next instanceof TaskNode))
        continue;
      TaskNode tn = (TaskNode) next;
      Task t = (Task) tn.getUserObject();
      if (t.equals(task))
        return tn;
    }
    return null;
  }
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskNode

    protected String getIconFilePrefix() {
        return isOn() ? ICON_PREFIX_ON : ICON_PREFIX_OFF;
    }

    public void actionPerformed(ActionEvent e) {
        TaskNode root = (TaskNode) tree.getRoot();
        setOn(!isOn());
        putValue(Action.SMALL_ICON, createIcon(myOptions.getIconSize()));
        if (isOn()) {
      taskManager.processCriticalPath(root);
      ArrayList projectTasks = ((GanttTree2)tree).getProjectTasks();
View Full Code Here

Examples of org.drools.jpdl.core.node.TaskNode

            generateConnections(mapping);
            node = newNode;
        } else if (jPDLnode instanceof org.jbpm.graph.node.TaskNode) {
            org.jbpm.graph.node.TaskNode jPDLtaskNode =
                    (org.jbpm.graph.node.TaskNode) jPDLnode;
            TaskNode newNode = new TaskNode();
            Set<Task> tasks = jPDLtaskNode.getTasks();
            newNode.setTasks(tasks);
            newNode.setSignal(jPDLtaskNode.getSignal());
            newNode.setCreateTasks(jPDLtaskNode.getCreateTasks());
            newNode.setEndTasks(jPDLtaskNode.isEndTasks());
            for (Task task : tasks) {
                org.jbpm.taskmgmt.def.Swimlane jPDLswimlane = task.getSwimlane();
                if (jPDLswimlane != null) {
                    String swimlaneName = jPDLswimlane.getName();
                    if (swimlaneContext.getSwimlane(swimlaneName) == null) {
View Full Code Here

Examples of org.jbpm.graph.node.TaskNode

         
          // and change the reference (take name mappings into account!)
          if (timer.getGraphElement() instanceof Task) {
            // change to new task definition
            Task oldTask = (Task)timer.getGraphElement();
            TaskNode oldNode =  oldTask.getTaskNode();
            timer.setGraphElement(
                findReplacementTask(newDef, oldNode, oldTask));
          }
          else {
            // change to new node
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.