Search in sources :

Example 1 with GPTreePanel

use of org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel in project geo-platform by geosdi.

the class EditWFSAction method getAllLayer.

/**
 * @param layerToExclude
 */
private void getAllLayer(GPLayerBean layerToExclude) {
    if (this.treePanel instanceof GPTreePanel) {
        List<GPLayerBean> layers = ((GPTreePanel) this.treePanel).getAllLayersOnTree();
        layers.remove(layerToExclude);
        GPBeanTreeModel root = treePanel.getStore().getRootItems().get(0);
        this.bus.fireEvent(new BuildLayerTreeEvent(root, layers));
    }
}
Also used : GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel) GPBeanTreeModel(org.geosdi.geoplatform.gui.model.tree.GPBeanTreeModel) GPLayerBean(org.geosdi.geoplatform.gui.model.GPLayerBean) BuildLayerTreeEvent(org.geosdi.geoplatform.gui.client.puregwt.wfs.event.BuildLayerTreeEvent)

Example 2 with GPTreePanel

use of org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel in project geo-platform by geosdi.

the class RefreshTimeComboBuilder method build.

protected ComboBox build(TreePanel tree) {
    combo.setEmptyText(LayerModuleConstants.INSTANCE.RefreshTimeComboBuilder_comboEmptyText());
    ListStore<LayerRefreshTimeValue> store = new ListStore<LayerRefreshTimeValue>();
    store.add(LayerRefreshTimeValue.getLayerRefreshTimeList());
    combo.setStore(store);
    combo.setEditable(Boolean.FALSE);
    combo.setForceSelection(Boolean.TRUE);
    combo.setTypeAhead(Boolean.FALSE);
    combo.setUseQueryCache(Boolean.FALSE);
    combo.setDisplayField(LayerRefreshTimeValue.REFRESH_TIME_KEY);
    combo.addSelectionChangedListener(new RefreshLayerAction((GPTreePanel<GPBeanTreeModel>) tree));
    return combo;
}
Also used : LayerRefreshTimeValue(org.geosdi.geoplatform.gui.client.model.LayerRefreshTimeValue) ListStore(com.extjs.gxt.ui.client.store.ListStore) RefreshLayerAction(org.geosdi.geoplatform.gui.client.action.menu.RefreshLayerAction) GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel)

Example 3 with GPTreePanel

use of org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel in project geo-platform by geosdi.

the class LayerFiltersWidgetUI method onModuleLoad.

/**
 * (non-Javadoc)
 *
 * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
 */
@Override
public void onModuleLoad() {
    TreeMenuActionRegistar registar = TreeMenuGinInjector.MainInjector.getInstance().getTreeMenuActionRegistar();
    registar.put("ADD_MODIFY_CQL_FILTER", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new AddModifyCQLFilterAction((GPTreePanel<GPBeanTreeModel>) treePanel);
        }
    });
    registar.put("REMOVE_CQL_FILTER", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new RemoveCQLFilterAction((GPTreePanel<GPBeanTreeModel>) treePanel);
        }
    });
}
Also used : MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) AddModifyCQLFilterAction(org.geosdi.geoplatform.gui.client.action.menu.cqlfilter.AddModifyCQLFilterAction) GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel) TreeMenuActionRegistar(org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionRegistar) RemoveCQLFilterAction(org.geosdi.geoplatform.gui.client.action.menu.cqlfilter.RemoveCQLFilterAction) TreeMenuActionCreator(org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionCreator) GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel) TreePanel(com.extjs.gxt.ui.client.widget.treepanel.TreePanel)

Example 4 with GPTreePanel

use of org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel in project geo-platform by geosdi.

the class TreeMenuActionFactory method buildLeafMenuActions.

private static void buildLeafMenuActions() {
    registar.put("ZOOM_TO_EXTEND", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ZoomToLayerExtentAction(treePanel);
        }
    });
    registar.put("GET_LEGEND", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new GetLegendGraphicsBox(treePanel);
        }
    });
    registar.put("EXPORT_TO_KML", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToKML(treePanel);
        }
    });
    registar.put("EXPORT_TO_PDF", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToPDF(treePanel);
        }
    });
    registar.put("EXPORT_TO_TIFF", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToTIFF(treePanel);
        }
    });
    registar.put("EXPORT_TO_SHP_ZIP", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToShpZip(treePanel);
        }
    });
    registar.put("EXPORT_GML_2", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToGML2(treePanel);
        }
    });
    registar.put("EXPORT_GML_3_1", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToGML3_1(treePanel);
        }
    });
    registar.put("EXPORT_GML_3_2", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToGML3_2(treePanel);
        }
    });
    registar.put("EXPORT_TO_CSV", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToCSV(treePanel);
        }
    });
    registar.put("EXPORT_TO_GEOJSON", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToGeoJSON(treePanel);
        }
    });
    registar.put("EXPORT_TO_RSS", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ExportoToGeoRSS(treePanel);
        }
    });
    registar.put("ADD_MODIFY_TIME_FILTER", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new AddModifyTimeFilterAction((GPTreePanel<GPBeanTreeModel>) treePanel);
        }
    });
    registar.put("REMOVE_TIME_FILTER", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new RemoveTimeFilterAction((GPTreePanel<GPBeanTreeModel>) treePanel);
        }
    });
    registar.put("CREATE_LAYER_VIEWPORT", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new CreateLayerViewportAction(treePanel);
        }
    });
    registar.put("COPY_LAYER", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return LayerModuleInjector.MainInjector.getInstance().getCopyLayerAction();
        }
    });
    registar.put("LAYER_PROPERTIES", new TreeMenuActionCreator() {

        @Override
        public MenuAction createAction(TreePanel treePanel) {
            return new ShowLayerPropertiesAction(treePanel);
        }
    });
}
Also used : GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel) TreeMenuActionCreator(org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionCreator) GetLegendGraphicsBox(org.geosdi.geoplatform.gui.client.action.menu.legend.GetLegendGraphicsBox) AddModifyTimeFilterAction(org.geosdi.geoplatform.gui.client.action.menu.time.AddModifyTimeFilterAction) MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) TreePanel(com.extjs.gxt.ui.client.widget.treepanel.TreePanel) GPTreePanel(org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel) RemoveTimeFilterAction(org.geosdi.geoplatform.gui.client.action.menu.time.RemoveTimeFilterAction)

Aggregations

GPTreePanel (org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel)4 TreePanel (com.extjs.gxt.ui.client.widget.treepanel.TreePanel)2 MenuAction (org.geosdi.geoplatform.gui.action.menu.MenuAction)2 TreeMenuActionCreator (org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionCreator)2 ListStore (com.extjs.gxt.ui.client.store.ListStore)1 TreeMenuActionRegistar (org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionRegistar)1 RefreshLayerAction (org.geosdi.geoplatform.gui.client.action.menu.RefreshLayerAction)1 AddModifyCQLFilterAction (org.geosdi.geoplatform.gui.client.action.menu.cqlfilter.AddModifyCQLFilterAction)1 RemoveCQLFilterAction (org.geosdi.geoplatform.gui.client.action.menu.cqlfilter.RemoveCQLFilterAction)1 GetLegendGraphicsBox (org.geosdi.geoplatform.gui.client.action.menu.legend.GetLegendGraphicsBox)1 AddModifyTimeFilterAction (org.geosdi.geoplatform.gui.client.action.menu.time.AddModifyTimeFilterAction)1 RemoveTimeFilterAction (org.geosdi.geoplatform.gui.client.action.menu.time.RemoveTimeFilterAction)1 LayerRefreshTimeValue (org.geosdi.geoplatform.gui.client.model.LayerRefreshTimeValue)1 BuildLayerTreeEvent (org.geosdi.geoplatform.gui.client.puregwt.wfs.event.BuildLayerTreeEvent)1 GPLayerBean (org.geosdi.geoplatform.gui.model.GPLayerBean)1 GPBeanTreeModel (org.geosdi.geoplatform.gui.model.tree.GPBeanTreeModel)1