001package jmri.jmrix.pricom.pockettester;
002
003import java.awt.event.ActionEvent;
004import javax.swing.AbstractAction;
005
006/**
007 * Swing action to create and register a PacketTable frame.
008 *
009 * @author Bob Jacobsen Copyright (C) 2005
010 */
011public abstract class PacketTableAction extends AbstractAction {
012
013    public PacketTableAction(String s) {
014        super(s);
015    }
016
017    public PacketTableAction() {
018        super();
019        putValue(javax.swing.Action.NAME, Bundle.getMessage("ActionPacketTable"));
020    }
021
022    @Override
023    public void actionPerformed(ActionEvent e) {
024
025        // create the frame & show
026        PacketTableFrame f = new PacketTableFrame();
027        f.initComponents();
028        connect(f);
029        f.setVisible(true);
030
031    }
032
033    abstract void connect(DataListener l);
034
035}