@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)); }
@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; }
@Override protected Widget onExtendedInitialization() { return new TaskWidget(getObject(), container.isWideMode()); }