List of usage examples for com.google.gwt.safehtml.shared SafeUri SafeUri
SafeUri
From source file:com.l3.CB.client.ui.widgets.ApplicationTextWidget.java
License:Open Source License
/** * // ww w. j av a2 s.com */ public static PopupPanel setupCBRuleBook() { final PopupPanel pPnlRuleBook = new PopupPanel(true); pPnlRuleBook.setGlassEnabled(true); pPnlRuleBook.setStyleName("infoModalPopupWindow"); FlowPanel sPnlContent = new FlowPanel(); PushButton close = new PushButton("Close"); close.addStyleName("infoModalPopupWindowClose"); close.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { pPnlRuleBook.hide(); } }); sPnlContent.add(close); sPnlContent.add(new HTML("<b>CB Rule-Book</b><br/><br/>")); SafeUri reportAbuseIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_REPORT_ABUSE_ICON; } }; SafeUri lameIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_LAME_ICON; } }; SafeUri sameBoatIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_SAME_BOAT_ICON; } }; SafeUri shouldBePardonedIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_SHOULD_BE_PARDONED_ICON; } }; SafeUri shouldNotBePardonedIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_SHOULD_NOT_BE_PARDONED_ICON; } }; SafeUri sympathyIconSafeUri = new SafeUri() { @Override public String asString() { return Constants.IMAGE_SYMPATHY_ICON; } }; sPnlContent.add(new HTML( Templates.TEMPLATES.voteHelp(reportAbuseIconSafeUri, ConfessionBox.cbText.abuseButtonToolTip()))); sPnlContent.add( new HTML(Templates.TEMPLATES.voteHelp(lameIconSafeUri, ConfessionBox.cbText.lameButtonToolTip()))); sPnlContent.add(new HTML( Templates.TEMPLATES.voteHelp(sameBoatIconSafeUri, ConfessionBox.cbText.sameBoatButtonToolTip()))); sPnlContent.add(new HTML(Templates.TEMPLATES.voteHelp(shouldBePardonedIconSafeUri, ConfessionBox.cbText.shouldBePardonedButtonToolTip()))); sPnlContent.add(new HTML(Templates.TEMPLATES.voteHelp(shouldNotBePardonedIconSafeUri, ConfessionBox.cbText.shouldNotBePardonedButtonToolTip()))); sPnlContent.add(new HTML( Templates.TEMPLATES.voteHelp(sympathyIconSafeUri, ConfessionBox.cbText.sympathyButtonToolTip()))); sPnlContent.add(new HTML( "<hr/>1. Confession Box is a secure application and your identity is never disclosed to anyone unless you yourself share your identity to the world.<br/>" + "2. You can read all the confessions on the 'Confession Wall' without logging-in on the CB and without providing any of your informations to CB.<br/>" + "3. If you register a confession with hidden identity, your identity can not be discovered by any one other than you (Unless you write your details in the confession text).<br/>" + "4. You can confess and appeal for pardon from a person in your facebook friend's list. A notification is sent to the person via email if the person is on CB.<br/>" + "5. If you appeal for pardon to someone, the person is informed about the confession along with your identity and a link to confession.<br/>" + "6. If some one has confessed to you, a notofication is sent to you. You can visit and check the confession and pardon for the same if you may.<br/>" + "7. While pardonning, you can set some conditions that should be met for the confession to be pardoned.<br/>" + "8. When all the conditions are met, the confession is pardoned and you and the confessee are notified about the pardon!<br/>" + "9. You can also subscribe a confession by clicking the 'Subscribe' link. You are notified about the confession when it is pardoned.<br/>" + "10. You are provided 'Human Points' for all the activities you do on CB that shall be a count of how good a human you are.")); pPnlRuleBook.add(sPnlContent); return pPnlRuleBook; }
From source file:com.ponysdk.ui.terminal.ui.PImageResource.java
License:Apache License
@Override public SafeUri getSafeUri() { return new SafeUri() { @Override/* w w w . ja v a2 s. c o m*/ public String asString() { return uri; } }; }
From source file:org.rstudio.studio.client.workbench.views.connections.ui.NewConnectionInstallOdbcPage.java
License:Open Source License
public NewConnectionInstallOdbcPage(final NewConnectionInfo info, String subTitle) { super(info.getName(), subTitle, info.getName() + " Installation", StringUtil.isNullOrEmpty(info.iconData()) ? null : new ImageResourceUrl(new SafeUri() { @Override/* ww w . j a v a2 s . co m*/ public String asString() { return info.iconData(); } }, 16, 16), null, new NewConnectionSnippetPage(info, subTitle)); info_ = info; }
From source file:org.rstudio.studio.client.workbench.views.connections.ui.NewConnectionInstallPackagePage.java
License:Open Source License
public NewConnectionInstallPackagePage(final NewConnectionInfo info) { super(info.getName(), "", info.getName() + " Connection", StringUtil.isNullOrEmpty(info.iconData()) ? null : new ImageResourceUrl(new SafeUri() { @Override/*www .j av a2 s . c o m*/ public String asString() { return info.iconData(); } }, 16, 16), null); info_ = info; RStudioGinjector.INSTANCE.injectMembers(this); }
From source file:org.rstudio.studio.client.workbench.views.connections.ui.NewConnectionPreInstallOdbcPage.java
License:Open Source License
public NewConnectionPreInstallOdbcPage(final NewConnectionInfo info, String subTitle) { super(info.getName(), subTitle, info.getName() + " Installation", StringUtil.isNullOrEmpty(info.iconData()) ? null : new ImageResourceUrl(new SafeUri() { @Override/*from ww w.ja v a 2 s .co m*/ public String asString() { return info.iconData(); } }, 16, 16), null, new NewConnectionInstallOdbcPage(info, subTitle)); info_ = info; options_ = ConnectionOptions.create("", ""); contents_.setIntermediateResult(options_); contents_.initializeInfo(info_); }
From source file:org.rstudio.studio.client.workbench.views.connections.ui.NewConnectionShinyPage.java
License:Open Source License
public NewConnectionShinyPage(final NewConnectionInfo info) { super(info.getName(), "", info.getName() + " Connection", StringUtil.isNullOrEmpty(info.iconData()) ? null : new ImageResourceUrl(new SafeUri() { @Override/* w w w . j av a2 s.c o m*/ public String asString() { return info.iconData(); } }, 16, 16), null); info_ = info; }
From source file:org.rstudio.studio.client.workbench.views.connections.ui.NewConnectionSnippetPage.java
License:Open Source License
public NewConnectionSnippetPage(final NewConnectionInfo info) { super(info.getName(), "", info.getName() + " Connection", StringUtil.isNullOrEmpty(info.iconData()) ? null : new ImageResourceUrl(new SafeUri() { @Override// w w w . ja va 2s . c o m public String asString() { return info.iconData(); } }, 16, 16), null); info_ = info; }