Search in sources :

Example 1 with RowExpander

use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.

the class RecordsContainer method prepareColumnModel.

@Override
public ColumnModel prepareColumnModel() {
    List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
    StringBuilder templateBuilder = new StringBuilder();
    templateBuilder.append("<p><b>");
    templateBuilder.append(CatalogFinderConstants.INSTANCE.RecordsContainer_xTemplateAbstractText());
    templateBuilder.append(":</b> {ABSTRACT_TEXT}</p><br>");
    templateBuilder.append("<p><b>");
    templateBuilder.append(CatalogFinderConstants.INSTANCE.RecordsContainer_xTemplateKeywordsText());
    templateBuilder.append(":</b><br></p>");
    templateBuilder.append("<tpl for=\"SUBJECTS\">");
    templateBuilder.append("<div>{.}</div>");
    templateBuilder.append("</tpl>");
    XTemplate tpl = XTemplate.create(templateBuilder.toString());
    rowExpander = new RowExpander(tpl);
    configs.add(rowExpander);
    ColumnConfig titleColumn = new ColumnConfig();
    titleColumn.setId(RecordKeyValue.TITLE.toString());
    titleColumn.setHeaderHtml(CatalogFinderConstants.INSTANCE.RecordsContainer_titleColumnHeaderText());
    titleColumn.setWidth(490);
    titleColumn.setFixed(true);
    titleColumn.setResizable(false);
    configs.add(titleColumn);
    selectionModel = new CheckBoxSelectionModel<FullRecord>();
    selectionModel.setSelectionMode(SelectionMode.SINGLE);
    configs.add(selectionModel.getColumn());
    return new ColumnModel(configs);
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig) FullRecord(org.geosdi.geoplatform.gui.client.model.FullRecord) XTemplate(com.extjs.gxt.ui.client.core.XTemplate) ColumnModel(com.extjs.gxt.ui.client.widget.grid.ColumnModel) RowExpander(com.extjs.gxt.ui.client.widget.grid.RowExpander)

Example 2 with RowExpander

use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.

the class CatalogGridLayersWidget method prepareColumnModel.

@Override
public ColumnModel prepareColumnModel() {
    List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
    XTemplate tpl = XTemplate.create("<p><b>Abstract:</b> {abstractText}</p>");
    rowExpander = new RowExpander(tpl);
    configs.add(rowExpander);
    ColumnConfig name = new ColumnConfig();
    name.setId(GPLayerGrid.GPLayerBeanKeyValue.GPLAYER_NAME.getValue());
    name.setHeaderHtml(CatalogFinderConstants.INSTANCE.CatalogGridLayersWidget_layerNameHeaderText());
    name.setWidth(200);
    configs.add(name);
    ColumnConfig title = new ColumnConfig();
    title.setId(GPLayerGrid.GPLayerBeanKeyValue.GPLAYER_LABEL.getValue());
    title.setHeaderHtml(CatalogFinderConstants.INSTANCE.CatalogGridLayersWidget_titleHeaderText());
    title.setWidth(150);
    configs.add(title);
    return new ColumnModel(configs);
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig) XTemplate(com.extjs.gxt.ui.client.core.XTemplate) ColumnModel(com.extjs.gxt.ui.client.widget.grid.ColumnModel) RowExpander(com.extjs.gxt.ui.client.widget.grid.RowExpander)

Example 3 with RowExpander

use of com.extjs.gxt.ui.client.widget.grid.RowExpander in project geo-platform by geosdi.

the class GridLayersWidget method prepareColumnModel.

@Override
public ColumnModel prepareColumnModel() {
    List<ColumnConfig> configs = Lists.<ColumnConfig>newArrayList();
    XTemplate tpl = XTemplate.create("<p><b>Abstract:</b> {abstractText}</p>");
    rowExpander = new RowExpander(tpl);
    configs.add(rowExpander);
    ColumnConfig name = new ColumnConfig();
    name.setId(GPLayerBeanKeyValue.GPLAYER_NAME.getValue());
    name.setHeaderHtml(ServerModuleConstants.INSTANCE.GridLayersWidget_layerNameHeaderText());
    name.setWidth(200);
    configs.add(name);
    ColumnConfig title = new ColumnConfig();
    title.setId(GPLayerBeanKeyValue.GPLAYER_LABEL.getValue());
    title.setHeaderHtml(ServerModuleConstants.INSTANCE.GridLayersWidget_titleHeaderText());
    title.setWidth(150);
    configs.add(title);
    return new ColumnModel(configs);
}
Also used : ColumnConfig(com.extjs.gxt.ui.client.widget.grid.ColumnConfig) XTemplate(com.extjs.gxt.ui.client.core.XTemplate) ColumnModel(com.extjs.gxt.ui.client.widget.grid.ColumnModel) RowExpander(com.extjs.gxt.ui.client.widget.grid.RowExpander)

Aggregations

XTemplate (com.extjs.gxt.ui.client.core.XTemplate)3 ColumnConfig (com.extjs.gxt.ui.client.widget.grid.ColumnConfig)3 ColumnModel (com.extjs.gxt.ui.client.widget.grid.ColumnModel)3 RowExpander (com.extjs.gxt.ui.client.widget.grid.RowExpander)3 FullRecord (org.geosdi.geoplatform.gui.client.model.FullRecord)1