001package jmri.jmrit.signalling;
002
003import javax.swing.BoxLayout;
004import javax.swing.JButton;
005import jmri.SignalMast;
006import jmri.util.JmriJFrame;
007
008/**
009 * Provide a JFrame to display a pane to edit the Signal Mast Logic for one Signal Mast.
010 *
011 * @author Kevin Dickerson Copyright (C) 2011
012 * @author Egbert Broerse 2018
013 */
014public class SignallingFrame extends JmriJFrame {
015
016    public SignallingFrame() {
017        super(false, true);
018    }
019
020    JButton sendButton;
021    SignallingPanel sigPanel;
022
023    /**
024     * Set the Signal Mast Logic frame's initial state.
025     *
026     * @see SignallingPanel
027     * @param source The Signal Mast this SML is directly linked to
028     * @param dest   The Signal Mast this SML is looking at
029     */
030    public void initComponents(SignalMast source, SignalMast dest) {
031        // the following code sets the frame's initial state
032        sigPanel = new SignallingPanel(source, dest, this);
033
034        setTitle(Bundle.getMessage("SignallingPairs"));  // NOI18N
035        getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
036
037        getContentPane().add(sigPanel); // panels are created in SignallingPanel()
038
039        addHelpMenu("package.jmri.jmrit.signalling.AddEditSignalingLogic", true);  // NOI18N
040
041        // pack for display
042        pack();
043    }
044
045}