[Schmitzm-commits] r630 - branches/2.0-RC2/src/skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 28 15:20:44 CET 2010
Author: mojays
Date: 2010-01-28 15:20:44 +0100 (Thu, 28 Jan 2010)
New Revision: 630
Added:
branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction.java
Log:
new XMapPaneAction
Added: branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction.java
===================================================================
--- branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction.java 2010-01-28 13:54:44 UTC (rev 629)
+++ branches/2.0-RC2/src/skrueger/geotools/XMapPaneAction.java 2010-01-28 14:20:44 UTC (rev 630)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin O. J. Schmitz.
+ *
+ * This file is part of the SCHMITZM library - a collection of utility
+ * classes based on Java 1.6, focusing (not only) on Java Swing
+ * and the Geotools library.
+ *
+ * The SCHMITZM project is hosted at:
+ * http://wald.intevation.org/projects/schmitzm/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License (license.txt)
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * or try this link: http://www.gnu.org/licenses/lgpl.html
+ *
+ * Contributors:
+ * Martin O. J. Schmitz - initial API and implementation
+ * Stefan A. Krüger - additional utility classes
+ ******************************************************************************/
+package skrueger.geotools;
+
+import java.awt.event.MouseEvent;
+import java.awt.geom.Point2D;
+
+import org.opengis.geometry.DirectPosition;
+
+/**
+ *
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a> (University of Bonn/Germany)
+ */
+public interface XMapPaneAction {
+
+ /**
+ * Defines the action in case of a single click on the map.
+ * @param mapPane map pane the action should be performed on
+ * @param ev mouse event of the action
+ * @param coord geo coordinate the click is performed on
+ */
+ public void performClick(XMapPane mapPane, MouseEvent ev, DirectPosition coord);
+
+ /**
+ * Defines the action in case of a mouse drag on the map. This method
+ * is called on every mouse motion.
+ * @param mapPane map pane the action should be performed on
+ * @param ev mouse event of the action
+ * @param dragStartPos window position the drag was started (the current
+ * position can be determined from the mouse event)
+ * @param startCoord geo coordinate the drag was started
+ * @param endCoord geo coordinate the drag is currently moved over
+ */
+ public void performDragging(XMapPane mapPane, MouseEvent ev, Point2D dragStartPos, DirectPosition startCoord, DirectPosition endCoord);
+
+ /**
+ * Defines the action in case of a window selection on the map (the moment
+ * a drag ends).
+ * @param mapPane map pane the action should be performed on
+ * @param ev mouse event of the action
+ * @param dragStartPos window position the window starts (the end
+ * position can be determined from the mouse event)
+ * @param startCoord geo coordinate the window starts
+ * @param endCoord geo coordinate the window ends
+ */
+ public void performWindow(XMapPane mapPane, MouseEvent ev, Point2D dragStartPos, DirectPosition startCoord, DirectPosition endCoord);
+}
More information about the Schmitzm-commits
mailing list