001package jmri.jmrit.whereused;
002
003import java.awt.event.ActionEvent;
004import jmri.util.swing.JmriAbstractAction;
005
006/**
007 * Swing action to create and register a WhereUsedFrame
008 *
009 * @author Dave Sand Copyright (C) 2020
010 */
011public class WhereUsedAction extends JmriAbstractAction {
012
013    public WhereUsedAction(String s) {
014        super(s);
015    }
016
017    public WhereUsedAction() {
018        this("WhereUsed");  // NOI18N
019    }
020
021    @Override
022    public void actionPerformed(ActionEvent e) {
023        WhereUsedFrame f = new WhereUsedFrame();
024        f.setVisible(true);
025    }
026
027    // never invoked, because we overrode actionPerformed above
028    @Override
029    public jmri.util.swing.JmriPanel makePanel() {
030        throw new IllegalArgumentException("Should not be invoked");  // NOI18N
031    }
032}