001package jmri.jmrit.ctc.editor.gui; 002 003import jmri.jmrit.ctc.editor.code.AwtWindowProperties; 004import jmri.jmrit.ctc.editor.code.CheckJMRIObject; 005import jmri.jmrit.ctc.editor.code.CodeButtonHandlerDataRoutines; 006import jmri.jmrit.ctc.editor.code.CommonSubs; 007import jmri.jmrit.ctc.editor.code.ProgramProperties; 008import java.util.ArrayList; 009import javax.swing.JComboBox; 010import javax.swing.JTable; 011import javax.swing.table.DefaultTableModel; 012import jmri.jmrit.ctc.ctcserialdata.CodeButtonHandlerData; 013import jmri.jmrit.ctc.ctcserialdata.ProjectsCommonSubs; 014 015/** 016 * 017 * @author Gregory J. Bedlek Copyright (C) 2018, 2019 018 */ 019public class FrmSIDI extends javax.swing.JFrame { 020 021 /** 022 * Creates new form dlgSIDI 023 */ 024 private static final String FORM_PROPERTIES = "DlgSIDI"; // NOI18N 025 private static final String PREFIX = "_mSIDI_"; // NOI18N 026 private final AwtWindowProperties _mAwtWindowProperties; 027 private boolean _mClosedNormally = false; 028 public boolean closedNormally() { return _mClosedNormally; } 029 private final CodeButtonHandlerData _mCodeButtonHandlerData; 030 private final ProgramProperties _mProgramProperties; 031 private final CheckJMRIObject _mCheckJMRIObject; 032 private final boolean _mSignalHeadSelected; 033 private CodeButtonHandlerData.TRAFFIC_DIRECTION _mSIDI_TrafficDirectionTemp; 034 035 private int _mSIDI_CodingAndResponseTimeOrig; 036 private int _mSIDI_TimeLockingIntervalOrig; 037 private CodeButtonHandlerData.TRAFFIC_DIRECTION _mSIDI_TrafficDirectionOrig; 038 039 private ArrayList<String> _mLeftRightTrafficSignalsArrayListOrig = new ArrayList<>(); 040 private ArrayList<String> _mRightLeftTrafficSignalsArrayListOrig = new ArrayList<>(); 041 042 private void initOrig(ArrayList<String> signalArrayList1, ArrayList<String> signalArrayList2) { 043 _mSIDI_CodingAndResponseTimeOrig = _mCodeButtonHandlerData._mSIDI_CodingTimeInMilliseconds; 044 _mSIDI_TimeLockingIntervalOrig = _mCodeButtonHandlerData._mSIDI_TimeLockingTimeInMilliseconds; 045 _mSIDI_TrafficDirectionOrig = _mCodeButtonHandlerData._mSIDI_TrafficDirection; 046 for (int index = 0; index < signalArrayList1.size(); index++) { 047 _mLeftRightTrafficSignalsArrayListOrig.add(signalArrayList1.get(index)); 048 } 049 for (int index = 0; index < signalArrayList2.size(); index++) { 050 _mRightLeftTrafficSignalsArrayListOrig.add(signalArrayList2.get(index)); 051 } 052 } 053 054 private boolean dataChanged() { 055 if (CommonSubs.getIntFromJTextFieldNoThrow(_mSIDI_CodingAndResponseTime) != _mSIDI_CodingAndResponseTimeOrig) return true; 056 if (CommonSubs.getIntFromJTextFieldNoThrow(_mSIDI_TimeLockingInterval) != _mSIDI_TimeLockingIntervalOrig) return true; 057 if (_mSIDI_TrafficDirectionOrig != _mSIDI_TrafficDirectionTemp) return true; 058 059 int tableLength = CommonSubs.compactDefaultTableModel(_mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel); 060 if (tableLength != _mLeftRightTrafficSignalsArrayListOrig.size()) return true; 061 for (int index = 0; index < tableLength; index++) { 062 if (!_mLeftRightTrafficSignalsArrayListOrig.get(index).equals(_mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel.getValueAt(index, 0))) return true; 063 } 064 tableLength = CommonSubs.compactDefaultTableModel(_mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel); 065 if (tableLength != _mRightLeftTrafficSignalsArrayListOrig.size()) return true; 066 for (int index = 0; index < tableLength; index++) { 067 if (!_mRightLeftTrafficSignalsArrayListOrig.get(index).equals(_mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel.getValueAt(index, 0))) return true; 068 } 069 return false; 070 } 071 072 private final DefaultTableModel _mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel; 073 private final DefaultTableModel _mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel; 074 075 public FrmSIDI( AwtWindowProperties awtWindowProperties, CodeButtonHandlerData codeButtonHandlerData, 076 ProgramProperties programProperties, CheckJMRIObject checkJMRIObject, 077 boolean signalHeadSelected) { 078 super(); 079 initComponents(); 080 CommonSubs.addHelpMenu(this, "package.jmri.jmrit.ctc.CTC_frmSIDI", true); // NOI18N 081 _mAwtWindowProperties = awtWindowProperties; 082 _mCodeButtonHandlerData = codeButtonHandlerData; 083 _mProgramProperties = programProperties; 084 _mCheckJMRIObject = checkJMRIObject; 085 _mSignalHeadSelected = signalHeadSelected; 086 CommonSubs.setMillisecondsEdit(_mSIDI_CodingAndResponseTime); 087 CommonSubs.setMillisecondsEdit(_mSIDI_TimeLockingInterval); 088 CommonSubs.populateJComboBoxWithBeans(_mSIDI_LeftInternalSensor, "Sensor", _mCodeButtonHandlerData._mSIDI_LeftInternalSensor.getHandleName(), false); // NOI18N 089 CommonSubs.populateJComboBoxWithBeans(_mSIDI_NormalInternalSensor, "Sensor", _mCodeButtonHandlerData._mSIDI_NormalInternalSensor.getHandleName(), false); // NOI18N 090 CommonSubs.populateJComboBoxWithBeans(_mSIDI_RightInternalSensor, "Sensor", _mCodeButtonHandlerData._mSIDI_RightInternalSensor.getHandleName(), false); // NOI18N 091 _mSIDI_CodingAndResponseTime.setText(Integer.toString(_mCodeButtonHandlerData._mSIDI_CodingTimeInMilliseconds)); 092 _mSIDI_TimeLockingInterval.setText(Integer.toString(_mCodeButtonHandlerData._mSIDI_TimeLockingTimeInMilliseconds)); 093 _mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel = (DefaultTableModel)_mSIDI_TableOfLeftToRightTrafficExternalSignalNames.getModel(); 094 ArrayList<String> signalsArrayList1 = ProjectsCommonSubs.getArrayListOfSignalNames(_mCodeButtonHandlerData._mSIDI_LeftRightTrafficSignals); 095 int signalsArrayListSize1 = signalsArrayList1.size(); 096 if (signalsArrayListSize1 > _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.getRowCount()) { // Has more than default (100 as of this writing) rows: 097 _mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel.setRowCount(signalsArrayListSize1); 098 } 099 for (int index = 0; index < signalsArrayListSize1; index++) { 100 _mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel.setValueAt(signalsArrayList1.get(index), index, 0); 101 } 102 _mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel = (DefaultTableModel)_mSIDI_TableOfRightToLeftTrafficExternalSignalNames.getModel(); 103 ArrayList<String> signalsArrayList2 = ProjectsCommonSubs.getArrayListOfSignalNames(_mCodeButtonHandlerData._mSIDI_RightLeftTrafficSignals); 104 int signalsArrayListSize2 = signalsArrayList2.size(); 105 if (signalsArrayListSize2 > _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.getRowCount()) { // Has more than default (100 as of this writing) rows: 106 _mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel.setRowCount(signalsArrayListSize2); 107 } 108 for (int index = 0; index < signalsArrayListSize2; index++) { 109 _mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel.setValueAt(signalsArrayList2.get(index), index, 0); 110 } 111 _mSIDI_TrafficDirectionTemp =_mCodeButtonHandlerData._mSIDI_TrafficDirection; 112 switch (_mSIDI_TrafficDirectionTemp) { 113 default: 114 case BOTH: 115 _mSIDI_BothTrafficButton.setSelected(true); 116 break; 117 case LEFT: 118 _mSIDI_LeftTrafficButton.setSelected(true); 119 break; 120 case RIGHT: 121 _mSIDI_RightTrafficButton.setSelected(true); 122 break; 123 } 124 125 initOrig(signalsArrayList1, signalsArrayList2); 126 _mAwtWindowProperties.setWindowState(this, FORM_PROPERTIES); 127 this.getRootPane().setDefaultButton(_mSaveAndClose); 128 129 enableSignalListComboBox(_mSIDI_TableOfLeftToRightTrafficExternalSignalNames); 130 enableSignalListComboBox(_mSIDI_TableOfRightToLeftTrafficExternalSignalNames); 131 } 132 133 public static boolean dialogCodeButtonHandlerDataValid(CheckJMRIObject checkJMRIObject, CodeButtonHandlerData codeButtonHandlerData) { 134 if (!codeButtonHandlerData._mSIDI_Enabled) return true; // Not enabled, can be no error! 135// For interrelationship(s) checks: 136 boolean leftTrafficDirection = codeButtonHandlerData._mSIDI_TrafficDirection != CodeButtonHandlerData.TRAFFIC_DIRECTION.RIGHT; 137 boolean rightTrafficDirection = codeButtonHandlerData._mSIDI_TrafficDirection != CodeButtonHandlerData.TRAFFIC_DIRECTION.LEFT; 138 139 boolean entriesInLeftRightTrafficSignals = codeButtonHandlerData._mSIDI_LeftRightTrafficSignals.size() != 0; 140 boolean entriesInRightLeftTrafficSignals = codeButtonHandlerData._mSIDI_RightLeftTrafficSignals.size() != 0; 141 142// Checks: 143 if (ProjectsCommonSubs.isNullOrEmptyString(codeButtonHandlerData._mSIDI_NormalInternalSensor.getHandleName())) return false; 144 if (leftTrafficDirection && !entriesInRightLeftTrafficSignals) return false; 145 if (rightTrafficDirection && !entriesInLeftRightTrafficSignals) return false; 146 if (!leftTrafficDirection && entriesInRightLeftTrafficSignals) return false; 147 if (!rightTrafficDirection && entriesInLeftRightTrafficSignals) return false; 148 for (String signalName : ProjectsCommonSubs.getArrayListOfSignalNames(codeButtonHandlerData._mSIDI_LeftRightTrafficSignals)) { 149 if (checkJMRIObject.checkSignal(signalName) == false) return false; 150 } 151 for (String signalName : ProjectsCommonSubs.getArrayListOfSignalNames(codeButtonHandlerData._mSIDI_RightLeftTrafficSignals)) { 152 if (checkJMRIObject.checkSignal(signalName) == false) return false; 153 } 154 return checkJMRIObject.validClassWithPrefix(PREFIX, codeButtonHandlerData); 155 } 156 157// Validate all internal fields as much as possible: 158 private ArrayList<String> formFieldsValid() { 159 ArrayList<String> errors = new ArrayList<>(); 160// For interrelationship(s) checks: 161 162 boolean leftTrafficDirection = _mSIDI_TrafficDirectionTemp != CodeButtonHandlerData.TRAFFIC_DIRECTION.RIGHT; 163 boolean rightTrafficDirection = _mSIDI_TrafficDirectionTemp != CodeButtonHandlerData.TRAFFIC_DIRECTION.LEFT; 164 165 // Convert the 100 row lists into occupied signal entries. 166 boolean entriesInLeftRightTrafficSignals = 167 ProjectsCommonSubs.getArrayListOfSignals( 168 CommonSubs.getStringArrayFromDefaultTableModel(_mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel) 169 ).size() != 0; 170 boolean entriesInRightLeftTrafficSignals = 171 ProjectsCommonSubs.getArrayListOfSignals( 172 CommonSubs.getStringArrayFromDefaultTableModel(_mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel) 173 ).size() != 0; 174 175// Checks: 176 177 if (leftTrafficDirection && !entriesInRightLeftTrafficSignals) errors.add(Bundle.getMessage("ErrorDlgSIDIDefineButNoEntriesIn", Bundle.getMessage("LabelSIDILeftTraffic"), _mTableOfRightToLeftTrafficSignalNamesPrompt.getText())); // NOI18N 178 if (rightTrafficDirection && !entriesInLeftRightTrafficSignals) errors.add(Bundle.getMessage("ErrorDlgSIDIDefineButNoEntriesIn", Bundle.getMessage("LabelSIDIRightTraffic"), _mTableOfLeftToRightTrafficSignalNamesPrompt.getText())); 179 180 if (!leftTrafficDirection && entriesInRightLeftTrafficSignals) errors.add(Bundle.getMessage("ErrorDlgSIDINotDefinedWithEntriesIn", Bundle.getMessage("LabelSIDILeftTraffic"), _mTableOfRightToLeftTrafficSignalNamesPrompt.getText())); // NOI18N 181 if (!rightTrafficDirection && entriesInLeftRightTrafficSignals) errors.add(Bundle.getMessage("ErrorDlgSIDINotDefinedWithEntriesIn", Bundle.getMessage("LabelSIDIRightTraffic"), _mTableOfLeftToRightTrafficSignalNamesPrompt.getText())); 182 183 _mCheckJMRIObject.analyzeForm(PREFIX, this, errors); 184 return errors; 185 } 186 187 /** 188 * Add a signal head/mast combo box as the default cell editor. 189 * @param table The signal table to be modified. 190 */ 191 public void enableSignalListComboBox(JTable table) { 192 // Create the signals combo box 193 JComboBox<String> comboBox = new JComboBox<>(); 194 if (_mSignalHeadSelected) { 195 CommonSubs.populateJComboBoxWithBeans(comboBox, "SignalHead", null, true); 196 } else { 197 CommonSubs.populateJComboBoxWithBeans(comboBox, "SignalMast", null, true); 198 } 199 200 // Update the signal list cell editor 201 table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); 202 table.getColumnModel().getColumn(0).setCellEditor(new javax.swing.DefaultCellEditor(comboBox)); 203 } 204 205 /** 206 * This method is called from within the constructor to initialize the form. 207 * WARNING: Do NOT modify this code. The content of this method is always 208 * regenerated by the Form Editor. 209 */ 210 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 211 private void initComponents() { 212 213 _mSIDI_TrafficDirection = new javax.swing.ButtonGroup(); 214 panelLeftColumn = new javax.swing.JPanel(); 215 _mSIDI_LeftInternalSensorPrompt = new javax.swing.JLabel(); 216 _mSIDI_LeftInternalSensor = new javax.swing.JComboBox<>(); 217 _mSIDI_NormalInternalSensorPrompt = new javax.swing.JLabel(); 218 _mSIDI_NormalInternalSensor = new javax.swing.JComboBox<>(); 219 _mSIDI_RightInternalSensorPrompt = new javax.swing.JLabel(); 220 _mSIDI_RightInternalSensor = new javax.swing.JComboBox<>(); 221 _mSIDI_LableCodeTimeLabel = new javax.swing.JLabel(); 222 _mSIDI_CodingAndResponseTime = new javax.swing.JFormattedTextField(); 223 _mSIDI_LockTimeLabel = new javax.swing.JLabel(); 224 _mSIDI_TimeLockingInterval = new javax.swing.JFormattedTextField(); 225 _mSIDI_TrafficDirectionGroupPanel = new javax.swing.JPanel(); 226 jLabel1 = new javax.swing.JLabel(); 227 _mSIDI_LeftTrafficButton = new javax.swing.JRadioButton(); 228 _mSIDI_BothTrafficButton = new javax.swing.JRadioButton(); 229 _mSIDI_RightTrafficButton = new javax.swing.JRadioButton(); 230 _mSIDI_SaveCloseLabel = new javax.swing.JLabel(); 231 _mSaveAndClose = new javax.swing.JButton(); 232 _mSIDI_CompactListsButton = new javax.swing.JButton(); 233 _mSIDI_CompactListsLabel = new javax.swing.JLabel(); 234 _mSIDI_ReapplyPatterns = new javax.swing.JButton(); 235 _mSIDI_LeftRightSignals = new javax.swing.JPanel(); 236 _mTableOfLeftToRightTrafficSignalNamesPrompt = new javax.swing.JLabel(); 237 jScrollPane1 = new javax.swing.JScrollPane(); 238 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames = new javax.swing.JTable(); 239 _mSIDI_RightLeftSignals = new javax.swing.JPanel(); 240 _mTableOfRightToLeftTrafficSignalNamesPrompt = new javax.swing.JLabel(); 241 jScrollPane2 = new javax.swing.JScrollPane(); 242 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames = new javax.swing.JTable(); 243 244 setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); 245 setTitle(Bundle.getMessage("TitleSIDI")); 246 addWindowListener(new java.awt.event.WindowAdapter() { 247 @Override 248 public void windowClosing(java.awt.event.WindowEvent evt) { 249 formWindowClosing(evt); 250 } 251 }); 252 253 _mSIDI_LeftInternalSensorPrompt.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 254 _mSIDI_LeftInternalSensorPrompt.setText(Bundle.getMessage("LabelSIDILeft")); 255 256 _mSIDI_LeftInternalSensor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 257 258 _mSIDI_NormalInternalSensorPrompt.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 259 _mSIDI_NormalInternalSensorPrompt.setText(Bundle.getMessage("LabelSIDINormal")); 260 261 _mSIDI_NormalInternalSensor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 262 263 _mSIDI_RightInternalSensorPrompt.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); 264 _mSIDI_RightInternalSensorPrompt.setText(Bundle.getMessage("LabelSIDIRight")); 265 266 _mSIDI_RightInternalSensor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); 267 268 _mSIDI_LableCodeTimeLabel.setText(Bundle.getMessage("LabelSIDICodeTime")); 269 270 _mSIDI_CodingAndResponseTime.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); 271 272 _mSIDI_LockTimeLabel.setText(Bundle.getMessage("LabelSIDILockTime")); 273 274 _mSIDI_TimeLockingInterval.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); 275 276 jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); 277 jLabel1.setText(Bundle.getMessage("LabelSIDITrafficDirection")); 278 jLabel1.setToolTipText(""); 279 jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 280 281 _mSIDI_TrafficDirection.add(_mSIDI_LeftTrafficButton); 282 _mSIDI_LeftTrafficButton.setText(Bundle.getMessage("LabelSIDILeftTraffic")); 283 _mSIDI_LeftTrafficButton.addActionListener(new java.awt.event.ActionListener() { 284 @Override 285 public void actionPerformed(java.awt.event.ActionEvent evt) { 286 _mSIDI_LeftTrafficButtonActionPerformed(evt); 287 } 288 }); 289 290 _mSIDI_TrafficDirection.add(_mSIDI_BothTrafficButton); 291 _mSIDI_BothTrafficButton.setText(Bundle.getMessage("LabelSIDIBothTraffic")); 292 _mSIDI_BothTrafficButton.addActionListener(new java.awt.event.ActionListener() { 293 @Override 294 public void actionPerformed(java.awt.event.ActionEvent evt) { 295 _mSIDI_BothTrafficButtonActionPerformed(evt); 296 } 297 }); 298 299 _mSIDI_TrafficDirection.add(_mSIDI_RightTrafficButton); 300 _mSIDI_RightTrafficButton.setText(Bundle.getMessage("LabelSIDIRightTraffic")); 301 _mSIDI_RightTrafficButton.addActionListener(new java.awt.event.ActionListener() { 302 @Override 303 public void actionPerformed(java.awt.event.ActionEvent evt) { 304 _mSIDI_RightTrafficButtonActionPerformed(evt); 305 } 306 }); 307 308 javax.swing.GroupLayout _mSIDI_TrafficDirectionGroupPanelLayout = new javax.swing.GroupLayout(_mSIDI_TrafficDirectionGroupPanel); 309 _mSIDI_TrafficDirectionGroupPanel.setLayout(_mSIDI_TrafficDirectionGroupPanelLayout); 310 _mSIDI_TrafficDirectionGroupPanelLayout.setHorizontalGroup( 311 _mSIDI_TrafficDirectionGroupPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 312 .addGroup(_mSIDI_TrafficDirectionGroupPanelLayout.createSequentialGroup() 313 .addContainerGap() 314 .addComponent(_mSIDI_LeftTrafficButton) 315 .addGap(18, 18, 18) 316 .addComponent(_mSIDI_BothTrafficButton) 317 .addGap(18, 18, 18) 318 .addComponent(_mSIDI_RightTrafficButton) 319 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 320 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, _mSIDI_TrafficDirectionGroupPanelLayout.createSequentialGroup() 321 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 322 .addComponent(jLabel1) 323 .addGap(58, 58, 58)) 324 ); 325 _mSIDI_TrafficDirectionGroupPanelLayout.setVerticalGroup( 326 _mSIDI_TrafficDirectionGroupPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 327 .addGroup(_mSIDI_TrafficDirectionGroupPanelLayout.createSequentialGroup() 328 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 329 .addComponent(jLabel1) 330 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 331 .addGroup(_mSIDI_TrafficDirectionGroupPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 332 .addComponent(_mSIDI_LeftTrafficButton) 333 .addComponent(_mSIDI_BothTrafficButton) 334 .addComponent(_mSIDI_RightTrafficButton))) 335 ); 336 337 _mSIDI_SaveCloseLabel.setText(Bundle.getMessage("InfoSIDICompact")); 338 339 _mSaveAndClose.setText(Bundle.getMessage("ButtonSaveClose")); 340 _mSaveAndClose.addActionListener(new java.awt.event.ActionListener() { 341 @Override 342 public void actionPerformed(java.awt.event.ActionEvent evt) { 343 _mSaveAndCloseActionPerformed(evt); 344 } 345 }); 346 347 javax.swing.GroupLayout panelLeftColumnLayout = new javax.swing.GroupLayout(panelLeftColumn); 348 panelLeftColumn.setLayout(panelLeftColumnLayout); 349 panelLeftColumnLayout.setHorizontalGroup( 350 panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 351 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLeftColumnLayout.createSequentialGroup() 352 .addContainerGap(28, Short.MAX_VALUE) 353 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 354 .addComponent(_mSIDI_TrafficDirectionGroupPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 355 .addGroup(panelLeftColumnLayout.createSequentialGroup() 356 .addComponent(_mSaveAndClose) 357 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 358 .addComponent(_mSIDI_SaveCloseLabel)) 359 .addGroup(panelLeftColumnLayout.createSequentialGroup() 360 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 361 .addComponent(_mSIDI_LockTimeLabel) 362 .addComponent(_mSIDI_LableCodeTimeLabel) 363 .addComponent(_mSIDI_NormalInternalSensorPrompt) 364 .addComponent(_mSIDI_LeftInternalSensorPrompt) 365 .addComponent(_mSIDI_RightInternalSensorPrompt)) 366 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 367 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 368 .addComponent(_mSIDI_RightInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 369 .addComponent(_mSIDI_NormalInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 370 .addComponent(_mSIDI_LeftInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 371 .addComponent(_mSIDI_CodingAndResponseTime, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) 372 .addComponent(_mSIDI_TimeLockingInterval, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))) 373 .addGap(24, 24, 24)) 374 ); 375 panelLeftColumnLayout.setVerticalGroup( 376 panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 377 .addGroup(panelLeftColumnLayout.createSequentialGroup() 378 .addGap(6, 6, 6) 379 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 380 .addComponent(_mSIDI_LeftInternalSensorPrompt) 381 .addComponent(_mSIDI_LeftInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 382 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 383 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 384 .addComponent(_mSIDI_NormalInternalSensorPrompt) 385 .addComponent(_mSIDI_NormalInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 386 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 387 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 388 .addComponent(_mSIDI_RightInternalSensorPrompt) 389 .addComponent(_mSIDI_RightInternalSensor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 390 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 391 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 392 .addComponent(_mSIDI_LableCodeTimeLabel) 393 .addComponent(_mSIDI_CodingAndResponseTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 394 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 395 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 396 .addComponent(_mSIDI_LockTimeLabel) 397 .addComponent(_mSIDI_TimeLockingInterval, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 398 .addGap(38, 38, 38) 399 .addComponent(_mSIDI_TrafficDirectionGroupPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 400 .addGap(36, 36, 36) 401 .addGroup(panelLeftColumnLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 402 .addComponent(_mSaveAndClose) 403 .addComponent(_mSIDI_SaveCloseLabel)) 404 .addContainerGap(98, Short.MAX_VALUE)) 405 ); 406 407 _mSIDI_CompactListsButton.setText(Bundle.getMessage("ButtonSIDIBoth")); 408 _mSIDI_CompactListsButton.addActionListener(new java.awt.event.ActionListener() { 409 @Override 410 public void actionPerformed(java.awt.event.ActionEvent evt) { 411 _mSIDI_CompactListsButtonActionPerformed(evt); 412 } 413 }); 414 415 _mSIDI_CompactListsLabel.setText(Bundle.getMessage("InfoSIDIRemove")); 416 417 _mSIDI_ReapplyPatterns.setText(Bundle.getMessage("ButtonReapply")); 418 _mSIDI_ReapplyPatterns.addActionListener(new java.awt.event.ActionListener() { 419 @Override 420 public void actionPerformed(java.awt.event.ActionEvent evt) { 421 _mSIDI_ReapplyPatternsActionPerformed(evt); 422 } 423 }); 424 425 _mTableOfLeftToRightTrafficSignalNamesPrompt.setText(Bundle.getMessage("LabelSIDILRTraffic")); 426 427 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.setModel(new javax.swing.table.DefaultTableModel( 428 new Object [][] { 429 {null}, 430 {null}, 431 {null}, 432 {null}, 433 {null}, 434 {null}, 435 {null}, 436 {null}, 437 {null}, 438 {null}, 439 {null}, 440 {null}, 441 {null}, 442 {null}, 443 {null}, 444 {null}, 445 {null}, 446 {null}, 447 {null}, 448 {null}, 449 {null}, 450 {null}, 451 {null}, 452 {null}, 453 {null}, 454 {null}, 455 {null}, 456 {null}, 457 {null}, 458 {null}, 459 {null}, 460 {null}, 461 {null}, 462 {null}, 463 {null}, 464 {null}, 465 {null}, 466 {null}, 467 {null}, 468 {null}, 469 {null}, 470 {null}, 471 {null}, 472 {null}, 473 {null}, 474 {null}, 475 {null}, 476 {null}, 477 {null}, 478 {null}, 479 {null}, 480 {null}, 481 {null}, 482 {null}, 483 {null}, 484 {null}, 485 {null}, 486 {null}, 487 {null}, 488 {null}, 489 {null}, 490 {null}, 491 {null}, 492 {null}, 493 {null}, 494 {null}, 495 {null}, 496 {null}, 497 {null}, 498 {null}, 499 {null}, 500 {null}, 501 {null}, 502 {null}, 503 {null}, 504 {null}, 505 {null}, 506 {null}, 507 {null}, 508 {null}, 509 {null}, 510 {null}, 511 {null}, 512 {null}, 513 {null}, 514 {null}, 515 {null}, 516 {null}, 517 {null}, 518 {null}, 519 {null}, 520 {null}, 521 {null}, 522 {null}, 523 {null}, 524 {null}, 525 {null}, 526 {null}, 527 {null}, 528 {null} 529 }, 530 new String [] { 531 "" 532 } 533 ) { 534 Class<?>[] types = new Class<?> [] { 535 java.lang.String.class 536 }; 537 538 @Override 539 public Class<?> getColumnClass(int columnIndex) { 540 return types [columnIndex]; 541 } 542 }); 543 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.setRowHeight(18); 544 jScrollPane1.setViewportView(_mSIDI_TableOfLeftToRightTrafficExternalSignalNames); 545 546 javax.swing.GroupLayout _mSIDI_LeftRightSignalsLayout = new javax.swing.GroupLayout(_mSIDI_LeftRightSignals); 547 _mSIDI_LeftRightSignals.setLayout(_mSIDI_LeftRightSignalsLayout); 548 _mSIDI_LeftRightSignalsLayout.setHorizontalGroup( 549 _mSIDI_LeftRightSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 550 .addGroup(_mSIDI_LeftRightSignalsLayout.createSequentialGroup() 551 .addContainerGap() 552 .addGroup(_mSIDI_LeftRightSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 553 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE) 554 .addComponent(_mTableOfLeftToRightTrafficSignalNamesPrompt)) 555 .addContainerGap()) 556 ); 557 _mSIDI_LeftRightSignalsLayout.setVerticalGroup( 558 _mSIDI_LeftRightSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 559 .addGroup(_mSIDI_LeftRightSignalsLayout.createSequentialGroup() 560 .addContainerGap() 561 .addComponent(_mTableOfLeftToRightTrafficSignalNamesPrompt) 562 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 563 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE) 564 .addContainerGap(18, Short.MAX_VALUE)) 565 ); 566 567 _mTableOfRightToLeftTrafficSignalNamesPrompt.setText(Bundle.getMessage("LabelSIDIRLTraffic")); 568 569 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.setModel(new javax.swing.table.DefaultTableModel( 570 new Object [][] { 571 {null}, 572 {null}, 573 {null}, 574 {null}, 575 {null}, 576 {null}, 577 {null}, 578 {null}, 579 {null}, 580 {null}, 581 {null}, 582 {null}, 583 {null}, 584 {null}, 585 {null}, 586 {null}, 587 {null}, 588 {null}, 589 {null}, 590 {null}, 591 {null}, 592 {null}, 593 {null}, 594 {null}, 595 {null}, 596 {null}, 597 {null}, 598 {null}, 599 {null}, 600 {null}, 601 {null}, 602 {null}, 603 {null}, 604 {null}, 605 {null}, 606 {null}, 607 {null}, 608 {null}, 609 {null}, 610 {null}, 611 {null}, 612 {null}, 613 {null}, 614 {null}, 615 {null}, 616 {null}, 617 {null}, 618 {null}, 619 {null}, 620 {null}, 621 {null}, 622 {null}, 623 {null}, 624 {null}, 625 {null}, 626 {null}, 627 {null}, 628 {null}, 629 {null}, 630 {null}, 631 {null}, 632 {null}, 633 {null}, 634 {null}, 635 {null}, 636 {null}, 637 {null}, 638 {null}, 639 {null}, 640 {null}, 641 {null}, 642 {null}, 643 {null}, 644 {null}, 645 {null}, 646 {null}, 647 {null}, 648 {null}, 649 {null}, 650 {null}, 651 {null}, 652 {null}, 653 {null}, 654 {null}, 655 {null}, 656 {null}, 657 {null}, 658 {null}, 659 {null}, 660 {null}, 661 {null}, 662 {null}, 663 {null}, 664 {null}, 665 {null}, 666 {null}, 667 {null}, 668 {null}, 669 {null}, 670 {null} 671 }, 672 new String [] { 673 "" 674 } 675 ) { 676 Class<?>[] types = new Class<?> [] { 677 java.lang.String.class 678 }; 679 680 @Override 681 public Class<?> getColumnClass(int columnIndex) { 682 return types [columnIndex]; 683 } 684 }); 685 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.setRowHeight(18); 686 jScrollPane2.setViewportView(_mSIDI_TableOfRightToLeftTrafficExternalSignalNames); 687 688 javax.swing.GroupLayout _mSIDI_RightLeftSignalsLayout = new javax.swing.GroupLayout(_mSIDI_RightLeftSignals); 689 _mSIDI_RightLeftSignals.setLayout(_mSIDI_RightLeftSignalsLayout); 690 _mSIDI_RightLeftSignalsLayout.setHorizontalGroup( 691 _mSIDI_RightLeftSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 692 .addGroup(_mSIDI_RightLeftSignalsLayout.createSequentialGroup() 693 .addContainerGap() 694 .addGroup(_mSIDI_RightLeftSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 695 .addComponent(_mTableOfRightToLeftTrafficSignalNamesPrompt) 696 .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)) 697 .addContainerGap()) 698 ); 699 _mSIDI_RightLeftSignalsLayout.setVerticalGroup( 700 _mSIDI_RightLeftSignalsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 701 .addGroup(_mSIDI_RightLeftSignalsLayout.createSequentialGroup() 702 .addContainerGap() 703 .addComponent(_mTableOfRightToLeftTrafficSignalNamesPrompt) 704 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 705 .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE) 706 .addContainerGap(18, Short.MAX_VALUE)) 707 ); 708 709 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 710 getContentPane().setLayout(layout); 711 layout.setHorizontalGroup( 712 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 713 .addGroup(layout.createSequentialGroup() 714 .addContainerGap() 715 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 716 .addGroup(layout.createSequentialGroup() 717 .addGap(6, 6, 6) 718 .addComponent(_mSIDI_ReapplyPatterns) 719 .addGap(39, 39, 39) 720 .addComponent(_mSIDI_CompactListsLabel) 721 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 722 .addComponent(_mSIDI_CompactListsButton) 723 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 724 .addGroup(layout.createSequentialGroup() 725 .addComponent(panelLeftColumn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 726 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 727 .addComponent(_mSIDI_LeftRightSignals, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 728 .addGap(18, 18, 18) 729 .addComponent(_mSIDI_RightLeftSignals, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 730 .addGap(17, 17, 17)))) 731 ); 732 layout.setVerticalGroup( 733 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 734 .addGroup(layout.createSequentialGroup() 735 .addContainerGap() 736 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 737 .addGroup(layout.createSequentialGroup() 738 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 739 .addComponent(panelLeftColumn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 740 .addComponent(_mSIDI_RightLeftSignals, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 741 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 742 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 743 .addComponent(_mSIDI_ReapplyPatterns) 744 .addComponent(_mSIDI_CompactListsLabel) 745 .addComponent(_mSIDI_CompactListsButton))) 746 .addComponent(_mSIDI_LeftRightSignals, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 747 .addGap(10, 10, 10)) 748 ); 749 750 pack(); 751 }// </editor-fold>//GEN-END:initComponents 752 753 private void _mSaveAndCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSaveAndCloseActionPerformed 754 if (CommonSubs.missingFieldsErrorDialogDisplayed(this, formFieldsValid(), false)) { 755 return; // Do not allow exit or transfer of data. 756 } 757 758 _mCodeButtonHandlerData._mSIDI_LeftInternalSensor = CommonSubs.getNBHSensor((String) _mSIDI_LeftInternalSensor.getSelectedItem(), false); 759 _mCodeButtonHandlerData._mSIDI_NormalInternalSensor = CommonSubs.getNBHSensor((String) _mSIDI_NormalInternalSensor.getSelectedItem(), false); 760 _mCodeButtonHandlerData._mSIDI_RightInternalSensor = CommonSubs.getNBHSensor((String) _mSIDI_RightInternalSensor.getSelectedItem(), false); 761 762 _mCodeButtonHandlerData._mSIDI_CodingTimeInMilliseconds = CommonSubs.getIntFromJTextFieldNoThrow(_mSIDI_CodingAndResponseTime); 763 _mCodeButtonHandlerData._mSIDI_TimeLockingTimeInMilliseconds = CommonSubs.getIntFromJTextFieldNoThrow(_mSIDI_TimeLockingInterval); 764 _mCodeButtonHandlerData._mSIDI_TrafficDirection = _mSIDI_TrafficDirectionTemp; 765 766 _mCodeButtonHandlerData._mSIDI_LeftRightTrafficSignals = ProjectsCommonSubs.getArrayListOfSignals(CommonSubs.getStringArrayFromDefaultTableModel(_mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel)); 767 _mCodeButtonHandlerData._mSIDI_RightLeftTrafficSignals = ProjectsCommonSubs.getArrayListOfSignals(CommonSubs.getStringArrayFromDefaultTableModel(_mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel)); 768 _mClosedNormally = true; 769 _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES); 770 dispose(); 771 }//GEN-LAST:event__mSaveAndCloseActionPerformed 772 773 private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing 774 _mAwtWindowProperties.saveWindowState(this, FORM_PROPERTIES); 775 if (CommonSubs.allowClose(this, dataChanged())) dispose(); 776 }//GEN-LAST:event_formWindowClosing 777 778 private void _mSIDI_CompactListsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSIDI_CompactListsButtonActionPerformed 779 CommonSubs.compactDefaultTableModel(_mSIDI_TableOfLeftToRightTrafficExternalSignalNamesDefaultTableModel); 780 CommonSubs.compactDefaultTableModel(_mSIDI_TableOfRightToLeftTrafficExternalSignalNamesDefaultTableModel); 781 }//GEN-LAST:event__mSIDI_CompactListsButtonActionPerformed 782 783 private void _mSIDI_ReapplyPatternsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSIDI_ReapplyPatternsActionPerformed 784 CodeButtonHandlerData temp = _mCodeButtonHandlerData; 785 temp = CodeButtonHandlerDataRoutines.uECBHDWSD_SIDI(_mProgramProperties, temp); 786 CommonSubs.populateJComboBoxWithBeans(_mSIDI_LeftInternalSensor, "Sensor", temp._mSIDI_LeftInternalSensor.getHandleName(), false); // NOI18N 787 CommonSubs.populateJComboBoxWithBeans(_mSIDI_NormalInternalSensor, "Sensor", temp._mSIDI_NormalInternalSensor.getHandleName(), false); // NOI18N 788 CommonSubs.populateJComboBoxWithBeans(_mSIDI_RightInternalSensor, "Sensor", temp._mSIDI_RightInternalSensor.getHandleName(), false); // NOI18N 789 }//GEN-LAST:event__mSIDI_ReapplyPatternsActionPerformed 790 791 private void _mSIDI_LeftTrafficButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSIDI_LeftTrafficButtonActionPerformed 792 _mSIDI_TrafficDirectionTemp = CodeButtonHandlerData.TRAFFIC_DIRECTION.LEFT; 793 794 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.setEnabled(false); 795 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.setEnabled(true); 796 797 _mTableOfLeftToRightTrafficSignalNamesPrompt.setEnabled(false); 798 _mTableOfRightToLeftTrafficSignalNamesPrompt.setEnabled(true); 799 }//GEN-LAST:event__mSIDI_LeftTrafficButtonActionPerformed 800 801 private void _mSIDI_BothTrafficButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSIDI_BothTrafficButtonActionPerformed 802 _mSIDI_TrafficDirectionTemp = CodeButtonHandlerData.TRAFFIC_DIRECTION.BOTH; 803 804 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.setEnabled(true); 805 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.setEnabled(true); 806 807 _mTableOfLeftToRightTrafficSignalNamesPrompt.setEnabled(true); 808 _mTableOfRightToLeftTrafficSignalNamesPrompt.setEnabled(true); 809 }//GEN-LAST:event__mSIDI_BothTrafficButtonActionPerformed 810 811 private void _mSIDI_RightTrafficButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__mSIDI_RightTrafficButtonActionPerformed 812 _mSIDI_TrafficDirectionTemp = CodeButtonHandlerData.TRAFFIC_DIRECTION.RIGHT; 813 814 _mSIDI_TableOfRightToLeftTrafficExternalSignalNames.setEnabled(false); 815 _mSIDI_TableOfLeftToRightTrafficExternalSignalNames.setEnabled(true); 816 817 _mTableOfRightToLeftTrafficSignalNamesPrompt.setEnabled(false); 818 _mTableOfLeftToRightTrafficSignalNamesPrompt.setEnabled(true); 819 }//GEN-LAST:event__mSIDI_RightTrafficButtonActionPerformed 820 821 // Variables declaration - do not modify//GEN-BEGIN:variables 822 private javax.swing.JRadioButton _mSIDI_BothTrafficButton; 823 private javax.swing.JFormattedTextField _mSIDI_CodingAndResponseTime; 824 private javax.swing.JButton _mSIDI_CompactListsButton; 825 private javax.swing.JLabel _mSIDI_CompactListsLabel; 826 private javax.swing.JLabel _mSIDI_LableCodeTimeLabel; 827 private javax.swing.JComboBox<String> _mSIDI_LeftInternalSensor; 828 private javax.swing.JLabel _mSIDI_LeftInternalSensorPrompt; 829 private javax.swing.JPanel _mSIDI_LeftRightSignals; 830 private javax.swing.JRadioButton _mSIDI_LeftTrafficButton; 831 private javax.swing.JLabel _mSIDI_LockTimeLabel; 832 private javax.swing.JComboBox<String> _mSIDI_NormalInternalSensor; 833 private javax.swing.JLabel _mSIDI_NormalInternalSensorPrompt; 834 private javax.swing.JButton _mSIDI_ReapplyPatterns; 835 private javax.swing.JComboBox<String> _mSIDI_RightInternalSensor; 836 private javax.swing.JLabel _mSIDI_RightInternalSensorPrompt; 837 private javax.swing.JPanel _mSIDI_RightLeftSignals; 838 private javax.swing.JRadioButton _mSIDI_RightTrafficButton; 839 private javax.swing.JLabel _mSIDI_SaveCloseLabel; 840 private javax.swing.JTable _mSIDI_TableOfLeftToRightTrafficExternalSignalNames; 841 private javax.swing.JTable _mSIDI_TableOfRightToLeftTrafficExternalSignalNames; 842 private javax.swing.JFormattedTextField _mSIDI_TimeLockingInterval; 843 private javax.swing.ButtonGroup _mSIDI_TrafficDirection; 844 private javax.swing.JPanel _mSIDI_TrafficDirectionGroupPanel; 845 private javax.swing.JButton _mSaveAndClose; 846 private javax.swing.JLabel _mTableOfLeftToRightTrafficSignalNamesPrompt; 847 private javax.swing.JLabel _mTableOfRightToLeftTrafficSignalNamesPrompt; 848 private javax.swing.JLabel jLabel1; 849 private javax.swing.JScrollPane jScrollPane1; 850 private javax.swing.JScrollPane jScrollPane2; 851 private javax.swing.JPanel panelLeftColumn; 852 // End of variables declaration//GEN-END:variables 853}