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