001package jmri.util.swing;
002
003import java.beans.PropertyChangeEvent;
004import java.beans.PropertyChangeListener;
005
006import javax.swing.JDialog;
007
008/**
009 * JDialogListener can be used to link JDialog instances with Frames.
010 * If the JMRI Web Frame Server, JmriJFrameServlet encounters a Frame with
011 * this listener attached, the Dialog will be accessible via the server.
012 * This listener must be removed when the Dialog is closed.
013 * @since 5.5.6
014 * @author Steve Young Copyright (C) 2023
015 */
016public class JDialogListener implements PropertyChangeListener {
017
018    private final JDialog thisDialog;
019
020    public JDialogListener(JDialog dialog){
021        super();
022        thisDialog = dialog;
023    }
024
025    public JDialog getDialog(){
026        return thisDialog;
027    }
028
029    @Override
030    public void propertyChange(PropertyChangeEvent evt) {
031    }
032
033}