Search in sources :

Example 1 with Html

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;
}
Also used : Html(com.extjs.gxt.ui.client.widget.Html)

Example 2 with 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));
}
Also used : LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) Html(com.extjs.gxt.ui.client.widget.Html)

Example 3 with Html

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;
}
Also used : Html(com.extjs.gxt.ui.client.widget.Html)

Example 4 with 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();
    }
}
Also used : Html(com.extjs.gxt.ui.client.widget.Html) Image(com.google.gwt.user.client.ui.Image) GPRasterBean(org.geosdi.geoplatform.gui.model.GPRasterBean) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel)

Example 5 with Html

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 = "&nbsp;" + 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));
}
Also used : TabItem(com.extjs.gxt.ui.client.widget.TabItem) LayoutContainer(com.extjs.gxt.ui.client.widget.LayoutContainer) BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) RowLayout(com.extjs.gxt.ui.client.widget.layout.RowLayout) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) GWTJahiaPublicationInfo(org.jahia.ajax.gwt.client.data.publication.GWTJahiaPublicationInfo) Html(com.extjs.gxt.ui.client.widget.Html) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Aggregations

Html (com.extjs.gxt.ui.client.widget.Html)9 LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)2 Image (com.google.gwt.user.client.ui.Image)2 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 TabItem (com.extjs.gxt.ui.client.widget.TabItem)1 SimpleComboValue (com.extjs.gxt.ui.client.widget.form.SimpleComboValue)1 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)1 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)1 RowLayout (com.extjs.gxt.ui.client.widget.layout.RowLayout)1 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 Widget (com.google.gwt.user.client.ui.Widget)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 GPRasterBean (org.geosdi.geoplatform.gui.model.GPRasterBean)1 GWTJahiaPublicationInfo (org.jahia.ajax.gwt.client.data.publication.GWTJahiaPublicationInfo)1