List of usage examples for com.google.gwt.user.client.ui DateLabel DateLabel
public DateLabel(DateTimeFormat format)
From source file:n3phele.client.widgets.OriginPanel.java
License:Open Source License
protected OriginPanel() { this.setWidth("100%"); this.addStyleName(N3phele.n3pheleResource.css().workspacePanel()); Cell<MenuItem> cell = new IconTextCell<MenuItem>(32, 32); header = new HorizontalPanel(); header.setWidth("100%"); header.addStyleName(N3phele.n3pheleResource.css().workspacePanelHeader()); header.add(new CellWidget<MenuItem>(cell, new MenuItem(N3phele.n3pheleResource.dataSetIcon(), "Origin", null))); this.add(header); quitWidget = new PushButton(new Image(N3phele.n3pheleResource.dialog_close()), new ClickHandler() { @Override/*from ww w .j a va 2 s . c om*/ public void onClick(ClickEvent event) { GWT.log("Hide popup"); OriginPanel.this.originPopup.hide(); } }); quitWidget.setWidth(N3phele.n3pheleResource.dialog_close().getWidth() + 4 + "px"); quitWidget.setHeight(N3phele.n3pheleResource.dialog_close().getHeight() + 4 + "px"); header.add(quitWidget); header.setCellHorizontalAlignment(quitWidget, HorizontalPanel.ALIGN_RIGHT); header.setCellVerticalAlignment(quitWidget, HorizontalPanel.ALIGN_TOP); table = new FlexTable(); repoPath = new InlineLabel(""); table.setWidget(1, 1, repoPath); fileSize = new FileSizeLabel(); table.setWidget(2, 1, fileSize); table.setWidget(2, 2, new InlineLabel("Last modified")); lastModified = new DateLabel(DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_TIME_MEDIUM)); table.setWidget(2, 3, lastModified); outOfDate = new Image(N3phele.n3pheleResource.outOfSyncIcon()); table.setWidget(2, 0, outOfDate); outOfDate.setVisible(false); table.getCellFormatter().setHeight(2, 0, "32"); table.getCellFormatter().setWidth(2, 0, "32"); activityLabel = new InlineLabel(""); table.setWidget(0, 1, activityLabel); activity = new InlineHyperlink("", false, ""); table.setWidget(0, 2, activity); table.getCellFormatter().setHorizontalAlignment(2, 2, HasHorizontalAlignment.ALIGN_LEFT); table.getFlexCellFormatter().setColSpan(0, 2, 2); table.getCellFormatter().setHorizontalAlignment(0, 2, HasHorizontalAlignment.ALIGN_LEFT); table.getFlexCellFormatter().setColSpan(1, 1, 3); table.getCellFormatter().setHorizontalAlignment(2, 1, HasHorizontalAlignment.ALIGN_LEFT); // table.getFlexCellFormatter().setColSpan(1, 1, 4); FlexTableHelper.fixRowSpan(table); this.add(table); }