All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geomajas.gwt2.client.controller.MapController Maven / Gradle / Ivy

The newest version!
/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */

package org.geomajas.gwt2.client.controller;

import org.geomajas.annotation.Api;
import org.geomajas.annotation.UserImplemented;
import org.geomajas.gwt.client.controller.Controller;
import org.geomajas.gwt2.client.map.MapPresenter;

/**
 * 

* General interface for an event controller that catches different types of mouse events on a map. Implementations of * this interface must than decide how to react on these events. Since a MapController receives the * original mouse events, it can influence their behavior. As such only one MapController can be active at * any one time on a {@link MapPresenter}. *

*

* Note that the {@link MapPresenter} also has a {@link MapPresenter#addMapListener(MapController)} method that allows * setting multiple MapControllers as passive listeners to mouse events. *

* * @author Pieter De Graef * @since 2.0.0 */ @UserImplemented @Api(allMethods = true) public interface MapController extends Controller { /** * Function executed when the controller instance is applied on the map. If something needs initializing, do it * here. * * @param presenter * The map presenter onto which this controller has been activated. */ void onActivate(MapPresenter presenter); /** * Function executed when the controller instance is removed from the map. The perfect moment to clean up all the * mess this controller made. * * @param presenter * The map presenter onto which this controller has been deactivated. */ void onDeactivate(MapPresenter presenter); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy