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; }
@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; }