use of org.geosdi.geoplatform.gui.action.ToolbarActionRegistar 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());
}
});
}
use of org.geosdi.geoplatform.gui.action.ToolbarActionRegistar in project geo-platform by geosdi.
the class BasicEditorPanel method getAction.
/**
* @param String id
*
* @return {@link ToolbarAction} associated with {@link EditorActionTool} ID
*/
protected final ToolbarAction getAction(String id) {
ToolbarActionRegistar toolbarRegistar = BasicGinInjector.MainInjector.getInstance().getToolbarActionRegistar();
ToolbarAction action = toolbarRegistar.get(id, geoPlatformMap);
if (action == null) {
throw new NullPointerException("The action with ID " + id + " is non existent");
}
return action;
}
use of org.geosdi.geoplatform.gui.action.ToolbarActionRegistar 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();
}
});
}
use of org.geosdi.geoplatform.gui.action.ToolbarActionRegistar 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);
}
});
}
use of org.geosdi.geoplatform.gui.action.ToolbarActionRegistar 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);
}
});
}
Aggregations