001package jmri.jmrit.ctc.editor.gui;
002
003import jmri.jmrit.ctc.editor.code.AwtWindowProperties;
004import jmri.jmrit.ctc.editor.code.CommonSubs;
005import jmri.jmrit.ctc.editor.code.ProgramProperties;
006
007/**
008 *
009 * @author Gregory J. Bedlek Copyright (C) 2018, 2019
010 */
011public class FrmPatterns extends javax.swing.JFrame {
012
013    /**
014     * Creates new form dlgProperties
015     */
016    private static final String FORM_PROPERTIES = "DlgPatterns";    // NOI18N
017    private final AwtWindowProperties _mAwtWindowProperties;
018    private final ProgramProperties _mProgramProperties;
019    private boolean _mClosedNormally = false;
020    public boolean closedNormally() { return _mClosedNormally; }
021
022    private String _mCodeButtonInternalSensorPatternOrig;
023    private String _mSIDI_LeftInternalSensorPatternOrig;
024    private String _mSIDI_NormalInternalSensorPatternOrig;
025    private String _mSIDI_RightInternalSensorPatternOrig;
026    private String _mSIDL_LeftInternalSensorPatternOrig;
027    private String _mSIDL_NormalInternalSensorPatternOrig;
028    private String _mSIDL_RightInternalSensorPatternOrig;
029    private String _mSWDI_NormalInternalSensorPatternOrig;
030    private String _mSWDI_ReversedInternalSensorPatternOrig;
031    private String _mSWDL_InternalSensorPatternOrig;
032    private String _mCO_CallOnToggleInternalSensorPatternOrig;
033    private String _mTUL_DispatcherInternalSensorLockTogglePatternOrig;
034    private String _mTUL_DispatcherInternalSensorUnlockedIndicatorPatternOrig;
035
036    private void initOrig(ProgramProperties programProperties) {
037        _mCodeButtonInternalSensorPatternOrig = programProperties._mCodeButtonInternalSensorPattern;
038        _mSIDI_LeftInternalSensorPatternOrig = programProperties._mSIDI_LeftInternalSensorPattern;
039        _mSIDI_NormalInternalSensorPatternOrig = programProperties._mSIDI_NormalInternalSensorPattern;
040        _mSIDI_RightInternalSensorPatternOrig = programProperties._mSIDI_RightInternalSensorPattern;
041        _mSIDL_LeftInternalSensorPatternOrig = programProperties._mSIDL_LeftInternalSensorPattern;
042        _mSIDL_NormalInternalSensorPatternOrig = programProperties._mSIDL_NormalInternalSensorPattern;
043        _mSIDL_RightInternalSensorPatternOrig = programProperties._mSIDL_RightInternalSensorPattern;
044        _mSWDI_NormalInternalSensorPatternOrig = programProperties._mSWDI_NormalInternalSensorPattern;
045        _mSWDI_ReversedInternalSensorPatternOrig = programProperties._mSWDI_ReversedInternalSensorPattern;
046        _mSWDL_InternalSensorPatternOrig = programProperties._mSWDL_InternalSensorPattern;
047        _mCO_CallOnToggleInternalSensorPatternOrig = programProperties._mCO_CallOnToggleInternalSensorPattern;
048        _mTUL_DispatcherInternalSensorLockTogglePatternOrig = programProperties._mTUL_DispatcherInternalSensorLockTogglePattern;
049        _mTUL_DispatcherInternalSensorUnlockedIndicatorPatternOrig = programProperties._mTUL_DispatcherInternalSensorUnlockedIndicatorPattern;
050    }
051    private boolean dataChanged() {
052        if (!_mCodeButtonInternalSensorPatternOrig.equals(_mCodeButtonInternalSensorPattern.getText())) return true;
053        if (!_mSIDI_LeftInternalSensorPatternOrig.equals(_mSIDI_LeftInternalSensorPattern.getText())) return true;
054        if (!_mSIDI_NormalInternalSensorPatternOrig.equals(_mSIDI_NormalInternalSensorPattern.getText())) return true;
055        if (!_mSIDI_RightInternalSensorPatternOrig.equals(_mSIDI_RightInternalSensorPattern.getText())) return true;
056        if (!_mSIDL_LeftInternalSensorPatternOrig.equals(_mSIDL_LeftInternalSensorPattern.getText())) return true;
057        if (!_mSIDL_NormalInternalSensorPatternOrig.equals(_mSIDL_NormalInternalSensorPattern.getText())) return true;
058        if (!_mSIDL_RightInternalSensorPatternOrig.equals(_mSIDL_RightInternalSensorPattern.getText())) return true;
059        if (!_mSWDI_NormalInternalSensorPatternOrig.equals(_mSWDI_NormalInternalSensorPattern.getText())) return true;
060        if (!_mSWDI_ReversedInternalSensorPatternOrig.equals(_mSWDI_ReversedInternalSensorPattern.getText())) return true;
061        if (!_mSWDL_InternalSensorPatternOrig.equals(_mSWDL_InternalSensorPattern.getText())) return true;
062        if (!_mCO_CallOnToggleInternalSensorPatternOrig.equals(_mCO_CallOnToggleInternalSensorPattern.getText())) return true;
063        if (!_mTUL_DispatcherInternalSensorLockTogglePatternOrig.equals(_mTUL_DispatcherInternalSensorLockTogglePattern.getText())) return true;
064        if (!_mTUL_DispatcherInternalSensorUnlockedIndicatorPatternOrig.equals(_mTUL_DispatcherInternalSensorUnlockedIndicatorPattern.getText())) return true;
065        return false;
066    }
067
068    public FrmPatterns(AwtWindowProperties awtWindowProperties, ProgramProperties programProperties) {
069        super();
070        initComponents();
071        CommonSubs.addHelpMenu(this, "package.jmri.jmrit.ctc.CTC_menuCfgPat", true);  // NOI18N
072        _mAwtWindowProperties = awtWindowProperties;
073        _mProgramProperties = programProperties;
074
075        _mCodeButtonInternalSensorPattern.setText(programProperties._mCodeButtonInternalSensorPattern);
076        _mSIDI_LeftInternalSensorPattern.setText(programProperties._mSIDI_LeftInternalSensorPattern);
077        _mSIDI_NormalInternalSensorPattern.setText(programProperties._mSIDI_NormalInternalSensorPattern);
078        _mSIDI_RightInternalSensorPattern.setText(programProperties._mSIDI_RightInternalSensorPattern);
079        _mSIDL_LeftInternalSensorPattern.setText(programProperties._mSIDL_LeftInternalSensorPattern);
080        _mSIDL_NormalInternalSensorPattern.setText(programProperties._mSIDL_NormalInternalSensorPattern);
081        _mSIDL_RightInternalSensorPattern.setText(programProperties._mSIDL_RightInternalSensorPattern);
082        _mSWDI_NormalInternalSensorPattern.setText(programProperties._mSWDI_NormalInternalSensorPattern);
083        _mSWDI_ReversedInternalSensorPattern.setText(programProperties._mSWDI_ReversedInternalSensorPattern);
084        _mSWDL_InternalSensorPattern.setText(programProperties._mSWDL_InternalSensorPattern);
085        _mCO_CallOnToggleInternalSensorPattern.setText(programProperties._mCO_CallOnToggleInternalSensorPattern);
086        _mTUL_DispatcherInternalSensorLockTogglePattern.setText(programProperties._mTUL_DispatcherInternalSensorLockTogglePattern);
087        _mTUL_DispatcherInternalSensorUnlockedIndicatorPattern.setText(programProperties._mTUL_DispatcherInternalSensorUnlockedIndicatorPattern);
088        initOrig(programProperties);
089        _mAwtWindowProperties.setWindowState(this, FORM_PROPERTIES);
090        this.getRootPane().setDefaultButton(_mSaveAndClose);
091    }
092
093    /**
094     * This method is called from within the constructor to initialize the form.
095     * WARNING: Do NOT modify this code. The content of this method is always
096     * regenerated by the Form Editor.
097     */
098    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
099    private void initComponents() {
100
101        _mCodeButtonInternalSensorPattern = new javax.swing.JTextField();
102        jLabel1 = new javax.swing.JLabel();
103        _mSIDI_LeftInternalSensorPattern = new javax.swing.JTextField();
104        _mSIDI_NormalInternalSensorPattern = new javax.swing.JTextField();
105        _mSIDI_RightInternalSensorPattern = new javax.swing.JTextField();
106        jLabel5 = new javax.swing.JLabel();
107        jLabel6 = new javax.swing.JLabel();
108        jLabel7 = new javax.swing.JLabel();
109        _mSWDI_NormalInternalSensorPattern = new javax.swing.JTextField();
110        _mSWDI_ReversedInternalSensorPattern = new javax.swing.JTextField();
111        jLabel13 = new javax.swing.JLabel();
112        jLabel14 = new javax.swing.JLabel();
113        _mSIDL_LeftInternalSensorPattern = new javax.swing.JTextField();
114        _mSIDL_NormalInternalSensorPattern = new javax.swing.JTextField();
115        _mSIDL_RightInternalSensorPattern = new javax.swing.JTextField();
116        jLabel9 = new javax.swing.JLabel();
117        jLabel10 = new javax.swing.JLabel();
118        jLabel11 = new javax.swing.JLabel();
119        _mSWDL_InternalSensorPattern = new javax.swing.JTextField();
120        jLabel16 = new javax.swing.JLabel();
121        _mCO_CallOnToggleInternalSensorPattern = new javax.swing.JTextField();
122        jLabel28 = new javax.swing.JLabel();
123        _mSaveAndClose = new javax.swing.JButton();
124        jLabel3 = new javax.swing.JLabel();
125        jLabel4 = new javax.swing.JLabel();
126        jLabel12 = new javax.swing.JLabel();
127        jLabel8 = new javax.swing.JLabel();
128        jLabel15 = new javax.swing.JLabel();
129        jLabel20 = new javax.swing.JLabel();
130        jLabel30 = new javax.swing.JLabel();
131        jLabel31 = new javax.swing.JLabel();
132        _mTUL_DispatcherInternalSensorLockTogglePattern = new javax.swing.JTextField();
133        jLabel32 = new javax.swing.JLabel();
134        _mTUL_DispatcherInternalSensorUnlockedIndicatorPattern = new javax.swing.JTextField();
135
136        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
137        setTitle(Bundle.getMessage("TItleDlgPat"));
138        addWindowListener(new java.awt.event.WindowAdapter() {
139            @Override
140            public void windowClosing(java.awt.event.WindowEvent evt) {
141                formWindowClosing(evt);
142            }
143        });
144
145        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
146        jLabel1.setText(Bundle.getMessage("LabelDlgPatCode"));
147        jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
148
149        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
150        jLabel5.setText(Bundle.getMessage("LabelDlgPatSigLeftInd"));
151
152        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
153        jLabel6.setText(Bundle.getMessage("LabelDlgPatSigNormalInd"));
154
155        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
156        jLabel7.setText(Bundle.getMessage("LabelDlgPatSigRightInd"));
157
158        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
159        jLabel13.setText(Bundle.getMessage("LabelDlgPatToNormalInd"));
160
161        jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
162        jLabel14.setText(Bundle.getMessage("LabelDlgPatToReverseInd"));
163
164        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
165        jLabel9.setText(Bundle.getMessage("LabelDlgPatSigLeftLever"));
166
167        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
168        jLabel10.setText(Bundle.getMessage("LabelDlgPatSigNormalLever"));
169
170        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
171        jLabel11.setText(Bundle.getMessage("LabelDlgPatSigRightLever"));
172
173        jLabel16.setText(Bundle.getMessage("LabelDlgPatToLever"));
174
175        jLabel28.setText(Bundle.getMessage("LabelDlgPatCallOn"));
176
177        _mSaveAndClose.setText(Bundle.getMessage("ButtonSaveClose"));
178        _mSaveAndClose.addActionListener(new java.awt.event.ActionListener() {
179            @Override
180            public void actionPerformed(java.awt.event.ActionEvent evt) {
181                _mSaveAndCloseActionPerformed(evt);
182            }
183        });
184
185        jLabel3.setText(Bundle.getMessage("InfoDlgPatGeneral"));
186
187        jLabel4.setText(Bundle.getMessage("InfoDlgPatSigInds"));
188
189        jLabel12.setText(Bundle.getMessage("InfoDlgPatToInds"));
190
191        jLabel8.setText(Bundle.getMessage("InfoDlgPatSigLevers"));
192
193        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
194        jLabel15.setText(Bundle.getMessage("InfoDlgPatToLever"));
195
196        jLabel20.setText(Bundle.getMessage("InfoDlgPatCallOn"));
197
198        jLabel30.setText(Bundle.getMessage("InfoDlgPatToLock"));
199
200        jLabel31.setText(Bundle.getMessage("LabelDlgPatLockToggle"));
201
202        jLabel32.setText(Bundle.getMessage("LabelDlgPatUnlockInd"));
203
204        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
205        getContentPane().setLayout(layout);
206        layout.setHorizontalGroup(
207            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
208            .addGroup(layout.createSequentialGroup()
209                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
210                    .addGroup(layout.createSequentialGroup()
211                        .addGap(27, 27, 27)
212                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
213                            .addComponent(jLabel5)
214                            .addComponent(jLabel1)
215                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
216                                .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
217                                .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
218                            .addComponent(jLabel10)
219                            .addComponent(jLabel11)
220                            .addComponent(jLabel8)
221                            .addComponent(jLabel9)
222                            .addComponent(jLabel4)))
223                    .addGroup(layout.createSequentialGroup()
224                        .addContainerGap()
225                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
226                            .addComponent(jLabel32)
227                            .addComponent(jLabel31)
228                            .addComponent(jLabel30))))
229                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
230                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
231                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
232                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
233                            .addGroup(layout.createSequentialGroup()
234                                .addComponent(_mSIDI_NormalInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
235                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
236                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
237                                    .addGroup(layout.createSequentialGroup()
238                                        .addComponent(jLabel16)
239                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
240                                        .addComponent(_mSWDL_InternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
241                                    .addGroup(layout.createSequentialGroup()
242                                        .addComponent(jLabel14)
243                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
244                                        .addComponent(_mSWDI_ReversedInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
245                                    .addGroup(layout.createSequentialGroup()
246                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
247                                            .addComponent(jLabel20)
248                                            .addComponent(jLabel28))
249                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
250                                        .addComponent(_mCO_CallOnToggleInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))))
251                            .addGroup(layout.createSequentialGroup()
252                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
253                                    .addGroup(layout.createSequentialGroup()
254                                        .addGap(0, 0, Short.MAX_VALUE)
255                                        .addComponent(jLabel12))
256                                    .addGroup(layout.createSequentialGroup()
257                                        .addComponent(_mSIDI_LeftInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
258                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
259                                        .addComponent(jLabel13)))
260                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
261                                .addComponent(_mSWDI_NormalInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
262                            .addGroup(layout.createSequentialGroup()
263                                .addGap(0, 0, Short.MAX_VALUE)
264                                .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)
265                                .addGap(109, 109, 109))
266                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
267                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
268                                    .addComponent(_mSIDL_RightInternalSensorPattern, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
269                                    .addComponent(_mSIDI_RightInternalSensorPattern, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
270                                    .addComponent(_mSIDL_NormalInternalSensorPattern, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
271                                    .addComponent(_mCodeButtonInternalSensorPattern, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
272                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
273                                        .addGap(65, 65, 65)
274                                        .addComponent(_mSaveAndClose)))
275                                .addGap(0, 0, Short.MAX_VALUE)))
276                        .addContainerGap())
277                    .addGroup(layout.createSequentialGroup()
278                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
279                            .addComponent(_mSIDL_LeftInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
280                            .addComponent(_mTUL_DispatcherInternalSensorLockTogglePattern, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)
281                            .addComponent(_mTUL_DispatcherInternalSensorUnlockedIndicatorPattern))
282                        .addGap(0, 0, Short.MAX_VALUE))))
283            .addGroup(layout.createSequentialGroup()
284                .addGap(260, 260, 260)
285                .addComponent(jLabel3)
286                .addGap(0, 334, Short.MAX_VALUE))
287        );
288        layout.setVerticalGroup(
289            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
290            .addGroup(layout.createSequentialGroup()
291                .addContainerGap()
292                .addComponent(jLabel3)
293                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
294                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
295                    .addComponent(_mCodeButtonInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
296                    .addComponent(jLabel1))
297                .addGap(18, 18, 18)
298                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
299                    .addComponent(jLabel4)
300                    .addComponent(jLabel12))
301                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
302                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
303                    .addComponent(_mSIDI_LeftInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
304                    .addComponent(jLabel5)
305                    .addComponent(_mSWDI_NormalInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
306                    .addComponent(jLabel13))
307                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
308                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
309                    .addComponent(_mSIDI_NormalInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
310                    .addComponent(jLabel6)
311                    .addComponent(_mSWDI_ReversedInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
312                    .addComponent(jLabel14))
313                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
314                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
315                    .addComponent(_mSIDI_RightInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
316                    .addComponent(jLabel7))
317                .addGap(18, 18, 18)
318                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
319                    .addComponent(jLabel15)
320                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
321                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
322                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
323                    .addComponent(_mSIDL_LeftInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
324                    .addComponent(jLabel9)
325                    .addComponent(_mSWDL_InternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
326                    .addComponent(jLabel16))
327                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
328                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
329                    .addComponent(_mSIDL_NormalInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
330                    .addComponent(jLabel10))
331                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
332                    .addGroup(layout.createSequentialGroup()
333                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
334                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
335                            .addComponent(_mSIDL_RightInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
336                            .addComponent(jLabel11))
337                        .addGap(28, 28, 28)
338                        .addComponent(jLabel30))
339                    .addGroup(layout.createSequentialGroup()
340                        .addGap(5, 5, 5)
341                        .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
342                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
343                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
344                            .addComponent(jLabel28)
345                            .addComponent(_mCO_CallOnToggleInternalSensorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
346                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
347                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
348                    .addComponent(jLabel31)
349                    .addComponent(_mTUL_DispatcherInternalSensorLockTogglePattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
350                .addGap(3, 3, 3)
351                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
352                    .addComponent(_mTUL_DispatcherInternalSensorUnlockedIndicatorPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
353                    .addComponent(jLabel32))
354                .addGap(18, 18, 18)
355                .addComponent(_mSaveAndClose)
356                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
357        );
358
359        pack();
360    }// </editor-fold>//GEN-END:initComponents
361
362    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
363        _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES);
364        if (CommonSubs.allowClose(this, dataChanged())) dispose();
365    }//GEN-LAST:event_formWindowClosing
366
367    private void _mSaveAndCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSaveAndCloseActionPerformed
368        _mProgramProperties._mCodeButtonInternalSensorPattern = _mCodeButtonInternalSensorPattern.getText();
369        _mProgramProperties._mSIDI_LeftInternalSensorPattern = _mSIDI_LeftInternalSensorPattern.getText();
370        _mProgramProperties._mSIDI_NormalInternalSensorPattern = _mSIDI_NormalInternalSensorPattern.getText();
371        _mProgramProperties._mSIDI_RightInternalSensorPattern = _mSIDI_RightInternalSensorPattern.getText();
372        _mProgramProperties._mSIDL_LeftInternalSensorPattern = _mSIDL_LeftInternalSensorPattern.getText();
373        _mProgramProperties._mSIDL_NormalInternalSensorPattern = _mSIDL_NormalInternalSensorPattern.getText();
374        _mProgramProperties._mSIDL_RightInternalSensorPattern = _mSIDL_RightInternalSensorPattern.getText();
375        _mProgramProperties._mSWDI_NormalInternalSensorPattern = _mSWDI_NormalInternalSensorPattern.getText();
376        _mProgramProperties._mSWDI_ReversedInternalSensorPattern = _mSWDI_ReversedInternalSensorPattern.getText();
377        _mProgramProperties._mSWDL_InternalSensorPattern = _mSWDL_InternalSensorPattern.getText();
378        _mProgramProperties._mCO_CallOnToggleInternalSensorPattern = _mCO_CallOnToggleInternalSensorPattern.getText();
379        _mProgramProperties._mTUL_DispatcherInternalSensorLockTogglePattern = _mTUL_DispatcherInternalSensorLockTogglePattern.getText();
380        _mProgramProperties._mTUL_DispatcherInternalSensorUnlockedIndicatorPattern = _mTUL_DispatcherInternalSensorUnlockedIndicatorPattern.getText();
381        _mClosedNormally = true;
382        _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES);
383        dispose();
384    }//GEN-LAST:event__mSaveAndCloseActionPerformed
385
386    // Variables declaration - do not modify//GEN-BEGIN:variables
387    private javax.swing.JTextField _mCO_CallOnToggleInternalSensorPattern;
388    private javax.swing.JTextField _mCodeButtonInternalSensorPattern;
389    private javax.swing.JTextField _mSIDI_LeftInternalSensorPattern;
390    private javax.swing.JTextField _mSIDI_NormalInternalSensorPattern;
391    private javax.swing.JTextField _mSIDI_RightInternalSensorPattern;
392    private javax.swing.JTextField _mSIDL_LeftInternalSensorPattern;
393    private javax.swing.JTextField _mSIDL_NormalInternalSensorPattern;
394    private javax.swing.JTextField _mSIDL_RightInternalSensorPattern;
395    private javax.swing.JTextField _mSWDI_NormalInternalSensorPattern;
396    private javax.swing.JTextField _mSWDI_ReversedInternalSensorPattern;
397    private javax.swing.JTextField _mSWDL_InternalSensorPattern;
398    private javax.swing.JButton _mSaveAndClose;
399    private javax.swing.JTextField _mTUL_DispatcherInternalSensorLockTogglePattern;
400    private javax.swing.JTextField _mTUL_DispatcherInternalSensorUnlockedIndicatorPattern;
401    private javax.swing.JLabel jLabel1;
402    private javax.swing.JLabel jLabel10;
403    private javax.swing.JLabel jLabel11;
404    private javax.swing.JLabel jLabel12;
405    private javax.swing.JLabel jLabel13;
406    private javax.swing.JLabel jLabel14;
407    private javax.swing.JLabel jLabel15;
408    private javax.swing.JLabel jLabel16;
409    private javax.swing.JLabel jLabel20;
410    private javax.swing.JLabel jLabel28;
411    private javax.swing.JLabel jLabel3;
412    private javax.swing.JLabel jLabel30;
413    private javax.swing.JLabel jLabel31;
414    private javax.swing.JLabel jLabel32;
415    private javax.swing.JLabel jLabel4;
416    private javax.swing.JLabel jLabel5;
417    private javax.swing.JLabel jLabel6;
418    private javax.swing.JLabel jLabel7;
419    private javax.swing.JLabel jLabel8;
420    private javax.swing.JLabel jLabel9;
421    // End of variables declaration//GEN-END:variables
422}