001// License: GPL. For details, see Readme.txt file.
002package org.openstreetmap.gui.jmapviewer.events;
003
004import java.util.EventObject;
005
006/**
007 * Used for passing events between UI components and other
008 * objects that register as a JMapViewerEventListener
009 *
010 * @author Jason Huntley
011 *
012 */
013public class JMVCommandEvent extends EventObject {
014    public enum COMMAND {
015        MOVE,
016        ZOOM
017    }
018
019    private COMMAND command;
020    /**
021     *
022     */
023    private static final long serialVersionUID = 8701544867914969620L;
024
025    public JMVCommandEvent(COMMAND cmd, Object source) {
026        super(source);
027
028        setCommand(cmd);
029    }
030
031    /**
032     * @return the command
033     */
034    public COMMAND getCommand() {
035        return command;
036    }
037
038    /**
039     * @param command the command to set
040     */
041    public void setCommand(COMMAND command) {
042        this.command = command;
043    }
044}