001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.plugins.eventbus.gui; 003 004import java.util.EventObject; 005 006import org.openstreetmap.josm.gui.MapFrame; 007 008/** 009 * Event fired when the map frame is initialized (after the first data is loaded). 010 */ 011public class MapFrameInitializedEvent extends EventObject { 012 013 private static final long serialVersionUID = 1L; 014 015 private final MapFrame oldFrame; 016 private final MapFrame newFrame; 017 018 /** 019 * Constructs a new {@code MapFrameInitializedEvent}. 020 * @param source object on which the Event initially occurred 021 * @param oldFrame The old MapFrame 022 * @param newFrame The new MapFrame 023 */ 024 public MapFrameInitializedEvent(Object source, MapFrame oldFrame, MapFrame newFrame) { 025 super(source); 026 this.oldFrame = oldFrame; 027 this.newFrame = newFrame; 028 } 029 030 /** 031 * Returns the old MapFrame. 032 * @return the old MapFrame 033 */ 034 public MapFrame getOldMapFrame() { 035 return oldFrame; 036 } 037 038 /** 039 * Returns the new MapFrame. 040 * @return the new MapFrame 041 */ 042 public MapFrame getNewMapFrame() { 043 return newFrame; 044 } 045}