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 void onUpdateBody() {
   requirementWidget.update();
   taskList.setObjects(getObject().getTasks());
   taskList.update();
   Gwt.update(right, createTaskButton);
   changeHistoryWidget.update();
 }
Ejemplo n.º 3
0
 private Widget createEventList(Date date) {
   BlockListWidget<SimpleEvent> list =
       new BlockListWidget<SimpleEvent>(
           SimpleEventBlock.FACTORY, new ChangeSimpleEventDateDropAction(date));
   list.setSelectionManager(selectionManager);
   list.setAutoSorter(SimpleEvent.TIME_COMPARATOR);
   lists.put(date, list);
   return list;
 }
Ejemplo n.º 4
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;
  }
Ejemplo n.º 5
0
 public void setTaskHighlighting(ElementPredicate<Task> predicate) {
   list.setTaskHighlighting(predicate);
 }
Ejemplo n.º 6
0
 public void setTasks(List<Task> tasks) {
   initialize();
   list.setObjects(tasks);
 }
Ejemplo n.º 7
0
 public boolean selectTask(Task task) {
   if (!list.contains(task)) update();
   return list.showObject(task);
 }
Ejemplo n.º 8
0
 public Task getSelectedTask() {
   return list == null ? null : list.getExtendedObject();
 }
Ejemplo n.º 9
0
 public void clearTaskHighlighting() {
   list.clearTaskHighlighting();
 }
Ejemplo n.º 10
0
 public void selectTask(Task task) {
   taskList.showObject(task);
 }