001package jmri.jmrix.lenz.swing.lzv100; 002 003import javax.swing.BoxLayout; 004import javax.swing.JButton; 005import javax.swing.JPanel; 006 007/** 008 * Frame displaying the LZV100 configuration utility. 009 * <p> 010 * This is a container for holding the LZV100 configuration utility. The actual 011 * configuration utility consists of two parts: 012 * <ul> 013 * <li>{@link jmri.jmrix.lenz.swing.lz100.LZ100InternalFrame} a command station 014 * configuration utility for the LZ100/LZV100</li> 015 * <li>{@link jmri.jmrix.lenz.swing.lv102.LV102InternalFrame} a configuration 016 * utility for the LV102 power station</li> 017 * </ul> 018 * 019 * @author Paul Bender Copyright (C) 2003,2005 020 */ 021public class LZV100Frame extends jmri.util.JmriJFrame { 022 023 public LZV100Frame(jmri.jmrix.lenz.XNetSystemConnectionMemo memo) { 024 this(Bundle.getMessage("MenuItemLZV100ConfigurationManager"), memo); 025 } 026 027 public LZV100Frame(String FrameName, jmri.jmrix.lenz.XNetSystemConnectionMemo memo) { 028 super(FrameName); 029 getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS)); 030 031 javax.swing.JInternalFrame LV102IFrame = new jmri.jmrix.lenz.swing.lv102.LV102InternalFrame(); 032 033 javax.swing.JPanel pane0 = new JPanel(); 034 pane0.add(LV102IFrame); 035 getContentPane().add(pane0); 036 037 javax.swing.JInternalFrame LZ100IFrame = new jmri.jmrix.lenz.swing.lz100.LZ100InternalFrame(memo); 038 039 javax.swing.JPanel pane1 = new JPanel(); 040 pane1.add(LZ100IFrame); 041 getContentPane().add(pane1); 042 043 JPanel pane2 = new JPanel(); 044 pane2.add(closeButton); 045 getContentPane().add(pane2); 046 047 // and prep for display 048 pack(); 049 050 // install close button handler 051 closeButton.addActionListener(a -> { 052 setVisible(false); 053 dispose(); 054 }); 055 056 } 057 058 final JButton closeButton = new JButton(Bundle.getMessage("ButtonClose")); 059 060}