001package jmri.jmrix.rps.swing.soundset; 002 003import javax.swing.BoxLayout; 004import jmri.jmrix.rps.RpsSystemConnectionMemo; 005 006/** 007 * Frame for controlling sound-speed calculation for RPS system. 008 * 009 * @author Bob Jacobsen Copyright (C) 2008 010 */ 011public class SoundSetFrame extends jmri.util.JmriJFrame { 012 013 RpsSystemConnectionMemo memo = null; 014 015 public SoundSetFrame(RpsSystemConnectionMemo _memo) { 016 super(); 017 memo = _memo; 018 setTitle(title()); 019 } 020 021 protected String title() { 022 return "RPS Sound Speed Control"; 023 } // product name, not translated 024 025 SoundSetPane pane; 026 027 @Override 028 public void dispose() { 029 if (pane != null) { 030 pane.dispose(); 031 } 032 // and unwind swing 033 super.dispose(); 034 } 035 036 @Override 037 public void initComponents() { 038 getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS)); 039 040 // add pane 041 pane = new SoundSetPane(); 042 pane.initComponents(); 043 getContentPane().add(pane); 044 045 // add help 046 addHelpMenu("package.jmri.jmrix.rps.swing.soundset.SoundSetFrame", true); 047 048 // prepare for display 049 pack(); 050 } 051 052}