use of com.extjs.gxt.ui.client.widget.Html in project activityinfo by bedatadriven.
the class LocationDialog method newHeader.
private Html newHeader(String string) {
Html html = new Html(string);
html.addStyleName(SiteFormResources.INSTANCE.style().locationDialogHeader());
return html;
}
use of com.extjs.gxt.ui.client.widget.Html in project activityinfo by bedatadriven.
the class IndicatorLinkPage method addSourceContainer.
private void addSourceContainer() {
LayoutContainer container = createContainer();
new Html("");
sourceDatabaseGrid = new DatabaseGridPanel(dispatcher);
sourceDatabaseGrid.setHeading("Source Database");
container.add(sourceDatabaseGrid, vflex(3));
sourceIndicatorGrid = new IndicatorGridPanel();
container.add(sourceIndicatorGrid, vflex(7));
}
use of com.extjs.gxt.ui.client.widget.Html in project activityinfo by bedatadriven.
the class LocationDialog method newExplanation.
private Html newExplanation(String string) {
Html html = new Html(string);
html.addStyleName(SiteFormResources.INSTANCE.style().locationDialogHelp());
return html;
}
use of com.extjs.gxt.ui.client.widget.Html in project geo-platform by geosdi.
the class GPLegendWidget method addLegend.
/**
* Add Legend Item in the Legend Store
*
* @param layerBean
*/
public void addLegend(GPLayerBean layerBean) {
if (this.legendsStore.getItemByItemId(layerBean.getUUID()) == null) {
ContentPanel cp = new ContentPanel();
cp.setHeadingText(layerBean.getLabel());
cp.setId(layerBean.getUUID());
cp.setHeaderVisible(false);
cp.setBorders(false);
cp.setBodyBorder(false);
cp.add(new Html("<h3>" + layerBean.getLabel() + "</h3>"));
Image image;
String dataSource;
StringBuilder imageURL = new StringBuilder();
if (!((GPRasterBean) layerBean).isSetAttribution()) {
if (layerBean.getDataSource().contains("gwc/service/wms")) {
dataSource = layerBean.getDataSource().replaceAll("gwc/service/wms", "wms");
} else if (!(layerBean.getDataSource().startsWith("http://ows")) && (layerBean.getDataSource().contains("/ows"))) {
dataSource = layerBean.getDataSource().replaceAll("/ows", "/wms");
} else {
dataSource = layerBean.getDataSource().replaceAll("/wfs", "/wms");
}
imageURL.append(dataSource).append(!dataSource.contains("?") ? GET_LEGEND_REQUEST : GET_LEGEND_REQUEST.replaceAll("\\?", "&")).append(layerBean.getName()).append(this.legendScaleAdapter.adaptScale(layerBean)).append("&service=WMS");
if (layerBean.getStyles() != null && layerBean.getStyles().size() > 0) {
imageURL.append("&STYLE=").append(layerBean.getStyles().get(0).getStyleString());
}
String authkeyTuple = GSAuthKeyManager.getAuthKeyTuple();
if (!authkeyTuple.equals("")) {
imageURL.append('&').append(authkeyTuple);
}
imageURL.append("&LEGEND_OPTIONS=forceRule:True;forceLabels:on");
} else {
imageURL.append(((GPRasterBean) layerBean).getLogoURLBean().getOnlineResource());
}
image = new Image(imageURL.toString());
cp.add(image);
this.legendsStore.add(cp);
this.legendsStore.layout();
}
}
use of com.extjs.gxt.ui.client.widget.Html in project jahia by Jahia.
the class UnpublicationWorkflow method initDialog.
protected void initDialog(WorkflowActionDialog dialog) {
TabItem tab = new TabItem("Unpublication infos");
tab.setLayout(new FitLayout());
PublicationStatusGrid g = new PublicationStatusGrid(publicationInfos, true, dialog.getLinker(), dialog.getContainer());
tab.add(g);
dialog.getTabPanel().add(tab);
TabItem p = dialog.getTabPanel().getItem(0);
LayoutContainer layoutContainer = new LayoutContainer(new RowLayout());
layoutContainer.setStyleAttribute("margin", "5px");
int results = 0;
int pageResults = 0;
for (GWTJahiaPublicationInfo info : publicationInfos) {
results++;
if (Boolean.TRUE.equals(info.get("isPage"))) {
pageResults++;
}
}
HorizontalPanel h = new HorizontalPanel();
h.add(GWTJahiaPublicationInfo.renderPublicationStatusImage(GWTJahiaPublicationInfo.UNPUBLISHED));
String text = " " + Messages.get("label.publication.unpublished.task", "Unpublishing content") + " : ";
if (results > 10) {
text += " <span style=\"color:red\">" + results + " " + Messages.get("label.items", "Items") + "</span>";
} else if (results > 1) {
text += results + " " + Messages.get("label.items", "Items");
} else {
text += results + " " + Messages.get("label.item", "Item");
}
if (pageResults > 0) {
if (pageResults > 1) {
text += " " + Messages.get("label.including", "including") + " <span style=\"color:red\">" + pageResults + " " + Messages.get("label.pages", "pages") + "</span>";
} else {
text += " " + Messages.get("label.including", "including") + " " + pageResults + " " + Messages.get("label.page", "page");
}
}
Html w = new Html(text);
h.add(w);
layoutContainer.add(h);
p.add(layoutContainer, new BorderLayoutData(Style.LayoutRegion.NORTH, 25));
}
Aggregations