@Override protected Widget onInitialization() { setHeight100(); lockInfo = new LockInfoWidget(); HeaderWidget header = new HeaderWidget(); sidebar = new SwitcherWidget(true); workarea.setStyleName("Workspace-body-center-content"); ScrollPanel workareaScroller = new ScrollPanel(Gwt.createDiv("Workspace-body-center-content", workarea)); workareaScroller.getElement().setId("workarea-scroller"); workareaScroller.setHeight("100%"); workarea.setScrollPanel(workareaScroller); FlowPanel body = new FlowPanel(); body.setStyleName("Workspace-body"); body.add(Gwt.createDiv("Workspace-body-west", sidebar)); body.add(Gwt.createDiv("Workspace-body-center", workareaScroller)); FlowPanel workspace = Gwt.createFlowPanel(Gwt.createDiv("Workspace-header", header), body); workspace.setStyleName("Workspace"); locker = new LockWidget(workspace); return new FullscreenPanel(locker); }
public void showDate(Date dateToShow) { this.date = dateToShow; updateBeginAndEnd(); lists.clear(); selectionManager.clear(); FlexTable table = new FlexTable(); table.setWidth("100%"); table.setCellPadding(2); table.getColumnFormatter().setWidth(0, "25px"); table.getColumnFormatter().setWidth(1, "40px"); table.getColumnFormatter().setWidth(2, "30px"); table.getColumnFormatter().setWidth(3, "40px"); // table.setBorderWidth(1); int row = 0; Date d = begin; int month = 0; int week = 0; while (d.compareTo(end) <= 0) { int w = d.getWeek(); if (w != week) { week = w; Widget weekWidget = Gwt.createDiv("DayListWidget-week", String.valueOf(week)); table.setWidget(row, 0, weekWidget); } int m = d.getMonth(); if (m != month) { month = m; Widget monthWidget = Gwt.createDiv("DayListWidget-month", Gwt.getMonthShort(month)); table.setWidget(row, 1, monthWidget); } table.setWidget(row, 2, Gwt.createDiv("DayListWidget-date", Gwt.formatDay(d.toJavaDate()))); table.setWidget( row, 3, Gwt.createDiv("DayListWidget-date", Gwt.formatWeekdayShort(d.toJavaDate()))); table.setWidget(row, 4, createDayContent(d)); formatRow(table, row); d = d.nextDay(); row++; } Widget downloadLink = ScrumGwt.createPdfLink( "Download as PDF", "calendar", "from", begin.toString(), "to", end.toString()); wrapper.setWidget(Gwt.createFlowPanel(table, Gwt.createSpacer(1, 10), downloadLink)); }
@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; }
private Widget createDayContent(Date date) { FlowPanel panel = new FlowPanel(); for (String info : calendar.getInfos(date)) { panel.add(Gwt.createDiv("DayListWidget-date-info", info)); } panel.add(createEventList(date)); return panel; }
@Override protected Widget onInitialization() { cardSlotsWrapper = new SimplePanel(); handCardsWrapper = new SimplePanel(); actionsWrapper = new SimplePanel(); FlowPanel pokerTable = new FlowPanel(); pokerTable.setStyleName("PlanningPokerWidget-table"); pokerTable.add(createTableBranding()); pokerTable.add(cardSlotsWrapper); if (getCurrentProject().isTeamMember(getCurrentUser())) { pokerTable.add(Gwt.createSpacer(1, 20)); pokerTable.add(handCardsWrapper); } pokerTable.add(Gwt.createSpacer(1, 20)); pokerTable.add(actionsWrapper); SimplePanel pokerTableBorder = Gwt.createDiv("PlanningPokerWidget-table-border", pokerTable); return pokerTableBorder; }
@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; }
private Widget createPageNavigator(int commentCount) { TableBuilder tb = new TableBuilder(); tb.setWidth(null); tb.addFieldLabel("Pages:"); int page = 1; int endIdx = COMMENTS_PER_PAGE - 1; tb.addSpacer(5, 1); if (currentPage > 1) { tb.add( Gwt.createDiv( "CommentsWidget-pageNavigator-page", new HyperlinkWidget(new ShowPageAction("<", currentPage - 1)))); } else { tb.add(Gwt.createDiv("CommentsWidget-pageNavigator-page-disabled", "<")); } tb.addSpacer(5, 1); while (true) { tb.addSpacer(5, 1); if (currentPage == page) { tb.add(Gwt.createDiv("CommentsWidget-pageNavigator-currentPage", String.valueOf(page))); } else { tb.add( Gwt.createDiv( "CommentsWidget-pageNavigator-page", new HyperlinkWidget(new ShowPageAction(String.valueOf(page), page)))); } if (endIdx >= commentCount - 1) break; page++; endIdx += COMMENTS_PER_PAGE; } tb.addSpacer(10, 1); if (page > currentPage) { tb.add( Gwt.createDiv( "CommentsWidget-pageNavigator-page", new HyperlinkWidget(new ShowPageAction(">", currentPage + 1)))); } else { tb.add(Gwt.createDiv("CommentsWidget-pageNavigator-page-disabled", ">")); } return Gwt.createDiv("CommentsWidget-pageNavigator", tb.createTable()); }
private Widget createTableBranding() { return Gwt.createDiv("PlanningPokerWidget-table-branding", "Planning Poker"); }