Exemplo 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;
  }
Exemplo n.º 2
0
  @Override
  protected void onInitializationHeader(BlockHeaderWidget header) {
    Requirement requirement = getObject();

    decidableOnInitialization = requirement.isDecidable();

    statusIcon = header.addIconWrapper();
    header.addText(requirement.getLabelModel());
    header.addText(requirement.getThemesAsStringModel(), true, false);
    header.addText(requirement.getTaskStatusLabelModel(), true);
    header.appendCell(new EmoticonsWidget(requirement), null, true);
    header.addMenuAction(new RejectRequirementAction(requirement));
    header.addMenuAction(new FixRequirementAction(requirement));
    header.addMenuAction(new CloseRequirementAction(requirement));
    header.addMenuAction(new ReopenRequirementAction(requirement));
    header.addMenuAction(new RemoveRequirementFromSprintAction(requirement));
    header.addMenuAction(new ActivateChangeHistoryAction(requirement));
    header.addMenuAction(new CreateTaskAction(requirement));
  }