001package jmri.jmrix.loconet.demoport; 002 003import javax.swing.Icon; 004 005import jmri.jmrit.swing.ToolsMenuAction; 006import jmri.util.swing.JmriAbstractAction; 007import jmri.util.swing.JmriPanel; 008import jmri.util.swing.WindowInterface; 009 010/** 011 * Action to launch DemoSerialPort. 012 * 013 * @author Paul Bender Copyright (C) 2003 014 * @author Bob Jacobsen Copyright (C) 2023 015 * @author Daniel Bergqvist Copyright (C) 2024 016 */ 017 018// Uncomment the line below to test this class 019//@org.openide.util.lookup.ServiceProvider(service = jmri.jmrit.swing.ToolsMenuAction.class) 020 021public class DemoSerialPortAction extends JmriAbstractAction implements ToolsMenuAction { 022 023 public DemoSerialPortAction(String s, WindowInterface wi) { 024 super(s, wi); 025 } 026 027 public DemoSerialPortAction(String s, Icon i, WindowInterface wi) { 028 super(s, i, wi); 029 } 030 031 public DemoSerialPortAction(String s) { 032 super(s); 033 } 034 035 public DemoSerialPortAction() { 036 this("Demo serial port"); 037 } 038 039 @Override 040 public JmriPanel makePanel() { 041 042 // create a new panel of your specific type here 043 jmri.jmrix.loconet.demoport.DemoPanel retval = new DemoPanel(); 044 045 retval.initComponents(); 046 return retval; 047 } 048 049}