Ejemplo n.º 1
0
  @Override
  protected Widget onExtendedInitialization() {
    Requirement requirement = getObject();

    requirementWidget =
        new RequirementWidget(requirement, false, false, true, false, false, false, false);
    taskList = new BlockListWidget<Task>(TaskInRequirementBlock.FACTORY);
    taskList.setAutoSorter(requirement.getTasksOrderComparator());
    if (requirement.getProject().isTeamMember(getCurrentUser())) {
      taskList.setDndSorting(true);
      taskList.setMoveObserver(new MoveObserver());
    }
    createTaskButton = new ButtonWidget(new CreateTaskAction(requirement));
    changeHistoryWidget = new ChangeHistoryWidget(requirement);

    FlowPanel left = new FlowPanel();
    left.add(requirementWidget);
    left.add(taskList);
    left.add(Gwt.createDiv("CreateTaskButtonWrapper", createTaskButton));
    left.add(changeHistoryWidget);

    right = new FlowPanel();
    if (requirement.isDecidable() && requirement.getProject().isProductOwner(getCurrentUser())) {
      right.add(RequirementWidget.createActionsPanelForCompletedRequirement(requirement));
      right.add(Gwt.createSpacer(1, 10));
    }
    right.add(ScrumGwt.createEmoticonsAndComments(requirement));

    bodyWidget = TableBuilder.row(20, left, right);
    return bodyWidget;
  }
Ejemplo n.º 2
0
  @Override
  protected Widget onInitialization() {
    list = new BlockListWidget<Task>(new TaskBlock.TaskBlockFactory(container), this.dropAction);
    list.setSelectionManager(container.getSelectionManager());
    list.setMinHeight(100);
    list.setAutoSorter(requirement.getTasksOrderComparator());
    if (requirement.getProject().isTeamMember(getCurrentUser())) {
      list.setDndSorting(createTaskButton);
      list.setMoveObserver(new MoveObserver());
    }

    FlowPanel panel = new FlowPanel();
    panel.add(list);
    if (createTaskButton)
      panel.add(
          Gwt.createDiv(
              "CreateTaskButtonWrapper",
              new ButtonWidget(new CreateTaskAction(requirement)).update()));

    return panel;
  }