001/*
002 * This file is part of McIDAS-V
003 *
004 * Copyright 2007-2024
005 * Space Science and Engineering Center (SSEC)
006 * University of Wisconsin - Madison
007 * 1225 W. Dayton Street, Madison, WI 53706, USA
008 * https://www.ssec.wisc.edu/mcidas/
009 * 
010 * All Rights Reserved
011 * 
012 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and
013 * some McIDAS-V source code is based on IDV and VisAD source code.  
014 * 
015 * McIDAS-V is free software; you can redistribute it and/or modify
016 * it under the terms of the GNU Lesser Public License as published by
017 * the Free Software Foundation; either version 3 of the License, or
018 * (at your option) any later version.
019 * 
020 * McIDAS-V is distributed in the hope that it will be useful,
021 * but WITHOUT ANY WARRANTY; without even the implied warranty of
022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
023 * GNU Lesser Public License for more details.
024 * 
025 * You should have received a copy of the GNU Lesser Public License
026 * along with this program.  If not, see https://www.gnu.org/licenses/.
027 */
028
029package edu.wisc.ssec.mcidasv.probes;
030
031import java.awt.Color;
032import java.util.EventListener;
033
034import visad.RealTuple;
035
036/**
037 * The listener interface for receiving {@link ReadoutProbe} events. Everything
038 * is handled in the standard Java idiom: implement required methods, register
039 * the implementing class using 
040 * {@link ReadoutProbe#addProbeListener(ProbeListener)} and listen away!
041 */
042public interface ProbeListener extends EventListener {
043
044    /**
045     * Invoked when a probe's position is changed.
046     * 
047     * @param event Describes the probe that moved, its old position, and its
048     * new position.
049     */
050    void probePositionChanged(final ProbeEvent<RealTuple> event);
051
052    /**
053     * Invoked when a probe's color has changed.
054     * 
055     * @param event Describes the probe that changed, its old color, and its
056     * new color.
057     */
058    void probeColorChanged(final ProbeEvent<Color> event);
059
060    /**
061     * Invoked when a probe's visibility has changed.
062     * 
063     * @param event Describes the probe that changed, its old visibility, and
064     * the new visibility. The previous and current values will always be the
065     * opposites of each other.
066     */
067    void probeVisibilityChanged(final ProbeEvent<Boolean> event);
068
069    /**
070     * Invoked when a probe's location format pattern has changed.
071     *
072     * @param event Describes the probe that changed, the old format pattern,
073     * and the probe's new format pattern.
074     */
075    void probeFormatPatternChanged(final ProbeEvent<String> event);
076}