List of usage examples for com.google.gwt.user.client.ui InlineHyperlink InlineHyperlink
public InlineHyperlink(String text, boolean asHTML, String targetHistoryToken)
From source file:com.googlesource.gerrit.plugins.xdocs.client.XDocDiffScreen.java
License:Apache License
protected static InlineHyperlink createIcon(ImageResource res, String tooltip, String target) { InlineHyperlink l = new InlineHyperlink(AbstractImagePrototype.create(res).getHTML(), true, target); if (tooltip != null) { l.setTitle(tooltip);/* ww w.java2 s. com*/ } return l; }
From source file:n3phele.client.widgets.FileDetailsPanel.java
License:Open Source License
protected FileDetailsPanel(Delegate<FileNode> deleteHandler, Delegate<FileNode> makePublicHandler, Delegate<FileNode> makePrivateHandler) { super();/* ww w . j a v a2 s .co m*/ this.deleteHander = deleteHandler; this.makePublicHandler = makePublicHandler; this.makePrivateHandler = makePrivateHandler; this.addStyleName(N3phele.n3pheleResource.css().workspacePanel()); ; header = new HorizontalPanel(); header.setSpacing(3); header.addStyleName(N3phele.n3pheleResource.css().workspacePanelHeader()); header.add(icon = new Image(N3phele.n3pheleResource.fileIcon())); header.add(banner = new InlineLabel("File details")); quitWidget = new PushButton(new Image(N3phele.n3pheleResource.dialog_close()), new ClickHandler() { @Override public void onClick(ClickEvent event) { GWT.log("Hide popup"); FileDetailsPanel.this.popup.hide(); } }); quitWidget.setPixelSize(N3phele.n3pheleResource.dialog_close().getWidth(), N3phele.n3pheleResource.dialog_close().getHeight() + 4); header.add(quitWidget); header.setCellHorizontalAlignment(icon, HorizontalPanel.ALIGN_LEFT); header.setCellHorizontalAlignment(banner, HorizontalPanel.ALIGN_LEFT); header.setCellHorizontalAlignment(quitWidget, HorizontalPanel.ALIGN_RIGHT); header.setCellVerticalAlignment(quitWidget, HorizontalPanel.ALIGN_TOP); header.setWidth("100%"); this.add(header); table = new FlexTable(); table.setWidget(0, 1, size = new InlineLabel()); table.setWidget(1, 0, modifiedLabel = new InlineLabel("Modified")); table.setWidget(1, 1, date = new InlineLabel()); table.setWidget(2, 0, originLabel = new InlineLabel("Created by")); table.setWidget(2, 1, activity = new InlineHyperlink("", false, "")); originLabel.setVisible(false); modifiedLabel.setVisible(false); activity.setVisible(false); this.add(table); buttonBar = new HorizontalPanel(); buttonBar.setWidth("100%"); this.add(buttonBar); delete = new Button("Delete", new ClickHandler() { @Override public void onClick(ClickEvent event) { FileDetailsPanel.this.deleteHander.execute(FileDetailsPanel.this.node); } }); makePublic = new Button("Make Public", new ClickHandler() { @Override public void onClick(ClickEvent event) { FileDetailsPanel.this.makePublicHandler.execute(FileDetailsPanel.this.node); } }); makePrivate = new Button("Make Private", new ClickHandler() { @Override public void onClick(ClickEvent event) { FileDetailsPanel.this.makePrivateHandler.execute(FileDetailsPanel.this.node); } }); }
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 w w w . ja v a 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); }