Search in sources :

Example 1 with MenuAction

use of org.geosdi.geoplatform.gui.action.menu.MenuAction in project geo-platform by geosdi.

the class LayerWidgetUI method addLayerWidgetAction.

/**
 */
private void addLayerWidgetAction() {
    MenuActionRegistar menuRegistar = BasicGinInjector.MainInjector.getInstance().getMenuActionRegistar();
    menuRegistar.put("layerMenu", new MenuActionCreator() {

        @Override
        public MenuAction createAction() {
            return new LayerMenuAction();
        }
    });
    menuRegistar.put("manageProjects", new MenuActionCreator() {

        @Override
        public MenuAction createAction() {
            return loadMenuProjects;
        }
    });
}
Also used : MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) LayerMenuAction(org.geosdi.geoplatform.gui.client.action.menu.LayerMenuAction) MenuActionCreator(org.geosdi.geoplatform.gui.action.menu.MenuActionCreator) MenuActionRegistar(org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar) LayerMenuAction(org.geosdi.geoplatform.gui.client.action.menu.LayerMenuAction)

Example 2 with MenuAction

use of org.geosdi.geoplatform.gui.action.menu.MenuAction in project geo-platform by geosdi.

the class TreeMenuActionFactory method buildCompositeMenuActions.

private static void buildCompositeMenuActions() {
    registar.put("PASTE_MENU", new TreeMenuActionCreator() {

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

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

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

Example 3 with MenuAction

use of org.geosdi.geoplatform.gui.action.menu.MenuAction in project geo-platform by geosdi.

the class TreeMenuActionFactory method buildRootMenuActions.

private static void buildRootMenuActions() {
    registar.put("ADD_FOLDER", new TreeMenuActionCreator() {

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

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

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

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

Example 4 with MenuAction

use of org.geosdi.geoplatform.gui.action.menu.MenuAction in project geo-platform by geosdi.

the class MapWidgetUI method addMapToolbarAction.

private void addMapToolbarAction() {
    ToolbarActionRegistar toolbarRegistar = BasicGinInjector.MainInjector.getInstance().getToolbarActionRegistar();
    toolbarRegistar.put("ZoomIn", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new ZoomInAction(mapWidget);
        }
    });
    toolbarRegistar.put("ZoomOut", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new ZoomOutAction(mapWidget);
        }
    });
    toolbarRegistar.put("ZoomPrevious", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new ZoomPreviousAction(mapWidget);
        }
    });
    toolbarRegistar.put("ZoomNext", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new ZoomNextAction(mapWidget);
        }
    });
    toolbarRegistar.put("GetFeatureInfo", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new GetFeatureInfoAction(mapWidget);
        }
    });
    toolbarRegistar.put("Measure", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new MeasureAction(mapWidget);
        }
    });
    toolbarRegistar.put("MeasureArea", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new MeasureAreaAction(mapWidget);
        }
    });
    MenuActionRegistar menuRegistar = BasicGinInjector.MainInjector.getInstance().getMenuActionRegistar();
    menuRegistar.put("viewport", new MenuActionCreator() {

        @Override
        public MenuAction createAction() {
            MapLayoutWidget mapLayoutWidget = Registry.get(MapRegistryEnum.MAP_LAYOUT_WIDGET.toString());
            return new ViewportAction(mapLayoutWidget.getMap());
        }
    });
}
Also used : MapLayoutWidget(org.geosdi.geoplatform.gui.client.widget.map.MapLayoutWidget) MenuActionCreator(org.geosdi.geoplatform.gui.action.menu.MenuActionCreator) ViewportAction(org.geosdi.geoplatform.gui.client.action.menu.ViewportAction) MenuActionRegistar(org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar) ZoomOutAction(org.geosdi.geoplatform.gui.client.action.toolbar.ZoomOutAction) MeasureAreaAction(org.geosdi.geoplatform.gui.client.action.toolbar.MeasureAreaAction) GetFeatureInfoAction(org.geosdi.geoplatform.gui.featureinfo.action.GetFeatureInfoAction) MeasureAction(org.geosdi.geoplatform.gui.client.action.toolbar.MeasureAction) MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) ToolbarActionCreator(org.geosdi.geoplatform.gui.action.ToolbarActionCreator) ToolbarAction(org.geosdi.geoplatform.gui.action.ToolbarAction) ZoomNextAction(org.geosdi.geoplatform.gui.client.action.toolbar.ZoomNextAction) ZoomPreviousAction(org.geosdi.geoplatform.gui.client.action.toolbar.ZoomPreviousAction) GeoPlatformMap(org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap) ZoomInAction(org.geosdi.geoplatform.gui.client.action.toolbar.ZoomInAction) ToolbarActionRegistar(org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)

Example 5 with MenuAction

use of org.geosdi.geoplatform.gui.action.menu.MenuAction in project geo-platform by geosdi.

the class Routing method addRoutingMenuAction.

private void addRoutingMenuAction() {
    MenuActionRegistar menuRegistar = BasicGinInjector.MainInjector.getInstance().getMenuActionRegistar();
    menuRegistar.put("routing", new MenuActionCreator() {

        @Override
        public MenuAction createAction() {
            return new RoutingMenuAction();
        }
    });
}
Also used : MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) RoutingMenuAction(org.geosdi.geoplatform.gui.client.action.RoutingMenuAction) RoutingMenuAction(org.geosdi.geoplatform.gui.client.action.RoutingMenuAction) MenuActionCreator(org.geosdi.geoplatform.gui.action.menu.MenuActionCreator) MenuActionRegistar(org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar)

Aggregations

MenuAction (org.geosdi.geoplatform.gui.action.menu.MenuAction)15 MenuActionCreator (org.geosdi.geoplatform.gui.action.menu.MenuActionCreator)8 MenuActionRegistar (org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar)7 TreePanel (com.extjs.gxt.ui.client.widget.treepanel.TreePanel)5 TreeMenuActionCreator (org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionCreator)5 GPTreePanel (org.geosdi.geoplatform.gui.client.widget.tree.GPTreePanel)4 ToolbarAction (org.geosdi.geoplatform.gui.action.ToolbarAction)2 ToolbarActionCreator (org.geosdi.geoplatform.gui.action.ToolbarActionCreator)2 ToolbarActionRegistar (org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)2 TreeMenuActionRegistar (org.geosdi.geoplatform.gui.action.tree.menu.TreeMenuActionRegistar)2 GeoPlatformMap (org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap)2 GoogleSignOnAction (org.geosdi.geoplatform.gui.client.action.GoogleSignOnAction)1 ManageRolesMenuAction (org.geosdi.geoplatform.gui.client.action.ManageRolesMenuAction)1 ManageUsersMenuAction (org.geosdi.geoplatform.gui.client.action.ManageUsersMenuAction)1 RoutingMenuAction (org.geosdi.geoplatform.gui.client.action.RoutingMenuAction)1 UserOptionsMenuAction (org.geosdi.geoplatform.gui.client.action.UserOptionsMenuAction)1 AboutGPAction (org.geosdi.geoplatform.gui.client.action.menu.AboutGPAction)1 GeocodingMenuAction (org.geosdi.geoplatform.gui.client.action.menu.GeocodingMenuAction)1 LayerMenuAction (org.geosdi.geoplatform.gui.client.action.menu.LayerMenuAction)1 ViewportAction (org.geosdi.geoplatform.gui.client.action.menu.ViewportAction)1