예제 #1
0
 @Override
 protected void onInitializationHeader(BlockHeaderWidget header) {
   Task task = getObject();
   statusIcon = header.insertPrefixIcon();
   if (container.isShowRequirement()) requirementLabel = header.appendCenterSuffix(null);
   if (container.isShowOwner()) ownerLabel = header.appendCenterSuffix(null);
   header.appendCell(new EmoticonsWidget(task), null, true, true, null);
   header.addMenuAction(new ClaimTaskAction(task));
   header.addMenuAction(new CloseTaskAction(task));
   header.addMenuAction(new ReopenTaskAction(task));
   header.addMenuAction(new UnclaimTaskAction(task));
   header.addMenuAction(new CreateTaskImpedimentAction(task));
   header.addMenuAction(new DeleteTaskAction(task));
 }
예제 #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;
  }
예제 #3
0
 @Override
 protected Widget onExtendedInitialization() {
   return new TaskWidget(getObject(), container.isWideMode());
 }