001package jmri.jmrix.loconet.sdfeditor;
002
003import javax.swing.BoxLayout;
004import jmri.jmrix.loconet.sdf.SdfBuffer;
005import jmri.util.JmriJFrame;
006
007/**
008 * Frame for editing Digitrax SDF files.
009 * <p>
010 * This is just an enclosure for the EditorPane, which does the real work.
011 * <p>
012 * This handles file read/write.
013 *
014 * @author Bob Jacobsen Copyright (C) 2007
015 */
016public class EditorFrame extends JmriJFrame {
017
018    // GUI member declarations
019    EditorPane pane;
020
021    public EditorFrame(SdfBuffer buff) {
022        super(Bundle.getMessage("TitleEditor"));
023
024        // general GUI config
025        getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
026
027        // add panel
028        pane = new EditorPane();
029        pane.addSdf(buff);
030        getContentPane().add(pane);
031
032        // add help menu to window
033        addHelpMenu("package.jmri.jmrix.loconet.sdfeditor.EditorFrame", true);
034
035        pack();
036
037    }
038
039    @Override
040    public void dispose() {
041        pane.dispose();
042        super.dispose();
043    }
044}