001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.plugins.eventbus.gui.preferences.imagery;
003
004import java.util.EventObject;
005
006/**
007 * Event fired when the validation status of the "add imagery" panel changes.
008 */
009public class ContentValidationEvent extends EventObject {
010
011    private static final long serialVersionUID = 1L;
012
013    private final boolean isValid;
014
015    /**
016     * Constructs a new {@code ContentValidationEvent}.
017     * @param source object on which the Event initially occurred
018     * @param isValid true if the conditions required to close this panel are met
019     */
020    public ContentValidationEvent(Object source, boolean isValid) {
021        super(source);
022        this.isValid = isValid;
023    }
024
025    /**
026     * Determines if the conditions required to close this panel are met.
027     * @return true if the conditions required to close this panel are met
028     */
029    public final boolean isValid() {
030        return isValid;
031    }
032}