Search in sources :

Example 1 with GeoPlatformMap

use of org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap 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 2 with GeoPlatformMap

use of org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap in project geo-platform by geosdi.

the class NotificationWidgetUI method onModuleLoad.

@Override
public void onModuleLoad() {
    // NotificationGinInjector.MainInjector.getInstance().getNotificationCenterMenuAction();
    ToolbarActionRegistar registar = BasicGinInjector.MainInjector.getInstance().getToolbarActionRegistar();
    registar.put("notificationMenu", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap map) {
            return NotificationGinInjector.MainInjector.getInstance().getNotificationCenterMenuAction();
        }
    });
}
Also used : ToolbarActionCreator(org.geosdi.geoplatform.gui.action.ToolbarActionCreator) ToolbarAction(org.geosdi.geoplatform.gui.action.ToolbarAction) GeoPlatformMap(org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap) ToolbarActionRegistar(org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)

Example 3 with GeoPlatformMap

use of org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap in project geo-platform by geosdi.

the class Geocoding method addReverseGeocodingAction.

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

        @Override
        public MenuAction createAction() {
            return new GeocodingMenuAction();
        }
    });
    ToolbarActionRegistar toolbarRegistar = BasicGinInjector.MainInjector.getInstance().getToolbarActionRegistar();
    toolbarRegistar.put("googleReverseGeocoding", new ToolbarActionCreator() {

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

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new YahooReverseGeocodingAction(mapWidget);
        }
    });
}
Also used : MenuAction(org.geosdi.geoplatform.gui.action.menu.MenuAction) GeocodingMenuAction(org.geosdi.geoplatform.gui.client.action.menu.GeocodingMenuAction) GeocodingMenuAction(org.geosdi.geoplatform.gui.client.action.menu.GeocodingMenuAction) MenuActionCreator(org.geosdi.geoplatform.gui.action.menu.MenuActionCreator) MenuActionRegistar(org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar) ToolbarActionCreator(org.geosdi.geoplatform.gui.action.ToolbarActionCreator) ToolbarAction(org.geosdi.geoplatform.gui.action.ToolbarAction) YahooReverseGeocodingAction(org.geosdi.geoplatform.gui.client.action.toolbar.YahooReverseGeocodingAction) GeoPlatformMap(org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap) GoogleReverseGeocodingAction(org.geosdi.geoplatform.gui.client.action.toolbar.GoogleReverseGeocodingAction) ToolbarActionRegistar(org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)

Example 4 with GeoPlatformMap

use of org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap in project geoplatform-base-app by geosdi.

the class BaseAppActions method addActionToolbar.

public static void addActionToolbar() {
    ToolbarActionRegistar toolbarRegistar = BasicGinInjector.MainInjector.getInstance().getToolbarActionRegistar();
    toolbarRegistar.put("GeoPlatformInfoApp", new ToolbarActionCreator() {

        @Override
        public ToolbarApplicationAction createActionTool(GeoPlatformMap mapWidget) {
            return new BaseInfoApp();
        }
    });
    toolbarRegistar.put("changeBaseLayer", new ToolbarActionCreator() {

        @Override
        public ToolbarAction createActionTool(GeoPlatformMap mapWidget) {
            return new ChangeBaseLayerAction(mapWidget);
        }
    });
}
Also used : ToolbarApplicationAction(org.geosdi.geoplatform.gui.action.ToolbarApplicationAction) ToolbarActionCreator(org.geosdi.geoplatform.gui.action.ToolbarActionCreator) ToolbarAction(org.geosdi.geoplatform.gui.action.ToolbarAction) BaseInfoApp(org.geosdi.geoplatform.gui.client.action.toolbar.BaseInfoApp) GeoPlatformMap(org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap) ChangeBaseLayerAction(org.geosdi.geoplatform.gui.client.action.toolbar.ChangeBaseLayerAction) ToolbarActionRegistar(org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)

Aggregations

ToolbarAction (org.geosdi.geoplatform.gui.action.ToolbarAction)4 ToolbarActionCreator (org.geosdi.geoplatform.gui.action.ToolbarActionCreator)4 ToolbarActionRegistar (org.geosdi.geoplatform.gui.action.ToolbarActionRegistar)4 GeoPlatformMap (org.geosdi.geoplatform.gui.impl.map.GeoPlatformMap)4 MenuAction (org.geosdi.geoplatform.gui.action.menu.MenuAction)2 MenuActionCreator (org.geosdi.geoplatform.gui.action.menu.MenuActionCreator)2 MenuActionRegistar (org.geosdi.geoplatform.gui.action.menu.MenuActionRegistar)2 ToolbarApplicationAction (org.geosdi.geoplatform.gui.action.ToolbarApplicationAction)1 GeocodingMenuAction (org.geosdi.geoplatform.gui.client.action.menu.GeocodingMenuAction)1 ViewportAction (org.geosdi.geoplatform.gui.client.action.menu.ViewportAction)1 BaseInfoApp (org.geosdi.geoplatform.gui.client.action.toolbar.BaseInfoApp)1 ChangeBaseLayerAction (org.geosdi.geoplatform.gui.client.action.toolbar.ChangeBaseLayerAction)1 GoogleReverseGeocodingAction (org.geosdi.geoplatform.gui.client.action.toolbar.GoogleReverseGeocodingAction)1 MeasureAction (org.geosdi.geoplatform.gui.client.action.toolbar.MeasureAction)1 MeasureAreaAction (org.geosdi.geoplatform.gui.client.action.toolbar.MeasureAreaAction)1 YahooReverseGeocodingAction (org.geosdi.geoplatform.gui.client.action.toolbar.YahooReverseGeocodingAction)1 ZoomInAction (org.geosdi.geoplatform.gui.client.action.toolbar.ZoomInAction)1 ZoomNextAction (org.geosdi.geoplatform.gui.client.action.toolbar.ZoomNextAction)1 ZoomOutAction (org.geosdi.geoplatform.gui.client.action.toolbar.ZoomOutAction)1 ZoomPreviousAction (org.geosdi.geoplatform.gui.client.action.toolbar.ZoomPreviousAction)1