001package jmri.jmrit.operations.locations.tools; 002 003import java.awt.*; 004 005import javax.swing.*; 006 007import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 008 009import jmri.InstanceManager; 010import jmri.jmrit.operations.OperationsFrame; 011import jmri.jmrit.operations.OperationsXml; 012import jmri.jmrit.operations.locations.Location; 013import jmri.jmrit.operations.locations.Track; 014import jmri.jmrit.operations.rollingstock.cars.*; 015import jmri.jmrit.operations.setup.Control; 016import jmri.jmrit.operations.setup.Setup; 017import jmri.util.swing.JmriJOptionPane; 018 019/** 020 * Frame for user edit of track loads 021 * 022 * @author Dan Boudreau Copyright (C) 2013, 2014, 2015, 2023 023 * 024 */ 025public class TrackLoadEditFrame extends OperationsFrame implements java.beans.PropertyChangeListener { 026 027 private static boolean loadAndType = false; 028 private static boolean shipLoadAndType = false; 029 030 Location _location = null; 031 Track _track = null; 032 String _type = ""; 033 JMenu _toolMenu = null; 034 035 // panels 036 JPanel pLoadControls = new JPanel(); 037 JPanel panelLoads = new JPanel(); 038 JScrollPane paneLoads = new JScrollPane(panelLoads); 039 040 JPanel pShipLoadControls = new JPanel(); 041 JPanel panelShipLoads = new JPanel(); 042 JScrollPane paneShipLoadControls; 043 JScrollPane paneShipLoads = new JScrollPane(panelShipLoads); 044 045 // major buttons 046 JButton saveButton = new JButton(Bundle.getMessage("ButtonSave")); 047 048 JButton addLoadButton = new JButton(Bundle.getMessage("AddLoad")); 049 JButton deleteLoadButton = new JButton(Bundle.getMessage("DeleteLoad")); 050 JButton deleteAllLoadsButton = new JButton(Bundle.getMessage("DeleteAll")); 051 052 JButton addShipLoadButton = new JButton(Bundle.getMessage("AddLoad")); 053 JButton deleteShipLoadButton = new JButton(Bundle.getMessage("DeleteLoad")); 054 JButton deleteAllShipLoadsButton = new JButton(Bundle.getMessage("DeleteAll")); 055 056 // check boxes 057 JCheckBox loadAndTypeCheckBox = new JCheckBox(Bundle.getMessage("TypeAndLoad")); 058 JCheckBox shipLoadAndTypeCheckBox = new JCheckBox(Bundle.getMessage("TypeAndLoad")); 059 JCheckBox holdCars = new JCheckBox(Bundle.getMessage("HoldCarsWithCustomLoads")); 060 JCheckBox disableloadChange = new JCheckBox(Bundle.getMessage("DisableLoadChange")); 061 062 // radio buttons 063 JRadioButton loadNameAll = new JRadioButton(Bundle.getMessage("AcceptAll")); 064 JRadioButton loadNameInclude = new JRadioButton(Bundle.getMessage("AcceptOnly")); 065 JRadioButton loadNameExclude = new JRadioButton(Bundle.getMessage("Exclude")); 066 067 JRadioButton shipLoadNameAll = new JRadioButton(Bundle.getMessage("ShipsAllLoads")); 068 JRadioButton shipLoadNameInclude = new JRadioButton(Bundle.getMessage("ShipOnly")); 069 JRadioButton shipLoadNameExclude = new JRadioButton(Bundle.getMessage("Exclude")); 070 071 // combo box 072 JComboBox<String> comboBoxLoads = InstanceManager.getDefault(CarLoads.class).getComboBox(null); 073 JComboBox<String> comboBoxShipLoads = InstanceManager.getDefault(CarLoads.class).getComboBox(null); 074 JComboBox<String> comboBoxTypes = InstanceManager.getDefault(CarTypes.class).getComboBox(); 075 JComboBox<String> comboBoxShipTypes = InstanceManager.getDefault(CarTypes.class).getComboBox(); 076 077 // labels 078 JLabel trackName = new JLabel(); 079 080 public static final String DISPOSE = "dispose"; // NOI18N 081 public static final int MAX_NAME_LENGTH = Control.max_len_string_track_name; 082 083 public TrackLoadEditFrame() { 084 super(Bundle.getMessage("TitleEditTrackLoads")); 085 } 086 087 public void initComponents(Location location, Track track) { 088 _location = location; 089 _track = track; 090 091 // property changes 092 _location.addPropertyChangeListener(this); 093 // listen for car load name and type changes 094 InstanceManager.getDefault(CarLoads.class).addPropertyChangeListener(this); 095 InstanceManager.getDefault(CarTypes.class).addPropertyChangeListener(this); 096 097 // the following code sets the frame's initial state 098 getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS)); 099 100 // Set up the panels 101 // Layout the panel by rows 102 // row 1 103 JPanel p1 = new JPanel(); 104 p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS)); 105 p1.setMaximumSize(new Dimension(2000, 250)); 106 107 // row 1a 108 JPanel pTrackName = new JPanel(); 109 pTrackName.setLayout(new GridBagLayout()); 110 pTrackName.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Track"))); 111 addItem(pTrackName, trackName, 0, 0); 112 113 // row 1b 114 JPanel pLocationName = new JPanel(); 115 pLocationName.setLayout(new GridBagLayout()); 116 pLocationName.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Location"))); 117 addItem(pLocationName, new JLabel(_location.getName()), 0, 0); 118 119 p1.add(pTrackName); 120 p1.add(pLocationName); 121 122 // row 3 123 JPanel p3 = new JPanel(); 124 p3.setLayout(new BoxLayout(p3, BoxLayout.Y_AXIS)); 125 JScrollPane pane3 = new JScrollPane(p3); 126 pane3.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("LoadsTrack"))); 127 pane3.setMaximumSize(new Dimension(2000, 400)); 128 129 JPanel pLoadRadioButtons = new JPanel(); 130 pLoadRadioButtons.setLayout(new FlowLayout()); 131 132 pLoadRadioButtons.add(loadNameAll); 133 pLoadRadioButtons.add(loadNameInclude); 134 pLoadRadioButtons.add(loadNameExclude); 135 pLoadRadioButtons.add(loadAndTypeCheckBox); 136 137 pLoadControls.setLayout(new FlowLayout()); 138 139 pLoadControls.add(comboBoxTypes); 140 pLoadControls.add(comboBoxLoads); 141 pLoadControls.add(addLoadButton); 142 pLoadControls.add(deleteLoadButton); 143 pLoadControls.add(deleteAllLoadsButton); 144 145 pLoadControls.setVisible(false); 146 147 p3.add(pLoadRadioButtons); 148 p3.add(pLoadControls); 149 150 // row 4 151 panelLoads.setLayout(new GridBagLayout()); 152 paneLoads.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Loads"))); 153 154 ButtonGroup loadGroup = new ButtonGroup(); 155 loadGroup.add(loadNameAll); 156 loadGroup.add(loadNameInclude); 157 loadGroup.add(loadNameExclude); 158 159 // row 6 160 JPanel p6 = new JPanel(); 161 p6.setLayout(new BoxLayout(p6, BoxLayout.Y_AXIS)); 162 paneShipLoadControls = new JScrollPane(p6); 163 paneShipLoadControls.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("ShipLoadsTrack"))); 164 paneShipLoadControls.setMaximumSize(new Dimension(2000, 400)); 165 166 JPanel pShipLoadRadioButtons = new JPanel(); 167 pShipLoadRadioButtons.setLayout(new FlowLayout()); 168 169 pShipLoadRadioButtons.add(shipLoadNameAll); 170 pShipLoadRadioButtons.add(shipLoadNameInclude); 171 pShipLoadRadioButtons.add(shipLoadNameExclude); 172 pShipLoadRadioButtons.add(shipLoadAndTypeCheckBox); 173 174 pShipLoadControls.setLayout(new FlowLayout()); 175 176 pShipLoadControls.add(comboBoxShipTypes); 177 pShipLoadControls.add(comboBoxShipLoads); 178 pShipLoadControls.add(addShipLoadButton); 179 pShipLoadControls.add(deleteShipLoadButton); 180 pShipLoadControls.add(deleteAllShipLoadsButton); 181 182 pShipLoadControls.setVisible(false); 183 184 p6.add(pShipLoadRadioButtons); 185 p6.add(pShipLoadControls); 186 187 // row 7 188 panelShipLoads.setLayout(new GridBagLayout()); 189 paneShipLoads.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Loads"))); 190 191 ButtonGroup shipLoadGroup = new ButtonGroup(); 192 shipLoadGroup.add(shipLoadNameAll); 193 shipLoadGroup.add(shipLoadNameInclude); 194 shipLoadGroup.add(shipLoadNameExclude); 195 196 JPanel pOptions = new JPanel(); 197 pOptions.setLayout(new GridBagLayout()); 198 pOptions.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Options"))); 199 pOptions.setMaximumSize(new Dimension(2000, 400)); 200 addItem(pOptions, holdCars, 0, 0); 201 addItem(pOptions, disableloadChange, 1, 0); 202 holdCars.setToolTipText(Bundle.getMessage("HoldCarsWithCustomLoadsTip")); 203 disableloadChange.setToolTipText(Bundle.getMessage("DisableLoadChangeTip")); 204 205 // row 12 206 JPanel panelButtons = new JPanel(); 207 panelButtons.setLayout(new GridBagLayout()); 208 panelButtons.setBorder(BorderFactory.createTitledBorder("")); 209 panelButtons.setMaximumSize(new Dimension(2000, 200)); 210 211 // row 13 212 addItem(panelButtons, saveButton, 0, 0); 213 214 getContentPane().add(p1); 215 getContentPane().add(pane3); 216 getContentPane().add(paneLoads); 217 getContentPane().add(paneShipLoadControls); 218 getContentPane().add(paneShipLoads); 219 getContentPane().add(pOptions); 220 getContentPane().add(panelButtons); 221 222 // setup buttons 223 addButtonAction(saveButton); 224 225 addButtonAction(deleteLoadButton); 226 addButtonAction(deleteAllLoadsButton); 227 addButtonAction(addLoadButton); 228 229 addButtonAction(deleteShipLoadButton); 230 addButtonAction(deleteAllShipLoadsButton); 231 addButtonAction(addShipLoadButton); 232 233 addRadioButtonAction(loadNameAll); 234 addRadioButtonAction(loadNameInclude); 235 addRadioButtonAction(loadNameExclude); 236 237 addRadioButtonAction(shipLoadNameAll); 238 addRadioButtonAction(shipLoadNameInclude); 239 addRadioButtonAction(shipLoadNameExclude); 240 241 addComboBoxAction(comboBoxTypes); 242 addComboBoxAction(comboBoxShipTypes); 243 244 paneShipLoadControls.setVisible(false); 245 paneShipLoads.setVisible(false); 246 pOptions.setVisible(false); 247 248 // load fields and enable buttons 249 if (_track != null) { 250 _track.addPropertyChangeListener(this); 251 trackName.setText(_track.getName()); 252 // only show ship loads for staging tracks 253 paneShipLoadControls.setVisible(_track.isStaging()); 254 paneShipLoads.setVisible(_track.isStaging()); 255 pOptions.setVisible(_track.isSpur()); 256 holdCars.setSelected(_track.isHoldCarsWithCustomLoadsEnabled()); 257 disableloadChange.setSelected(_track.isDisableLoadChangeEnabled()); 258 updateButtons(true); 259 } else { 260 updateButtons(false); 261 } 262 263 // build menu 264 // JMenuBar menuBar = new JMenuBar(); 265 // _toolMenu = new JMenu(Bundle.getMessage("MenuTools")); 266 // menuBar.add(_toolMenu); 267 // setJMenuBar(menuBar); 268 // load 269 updateTypeComboBoxes(); 270 updateLoadComboBoxes(); 271 updateLoadNames(); 272 updateShipLoadNames(); 273 274 loadAndTypeCheckBox.setSelected(loadAndType); 275 shipLoadAndTypeCheckBox.setSelected(shipLoadAndType); 276 277 // add help menu to window 278 addHelpMenu("package.jmri.jmrit.operations.Operations_LoadOptions", true); // NOI18N 279 280 initMinimumSize(new Dimension(Control.panelWidth600, Control.panelHeight400)); 281 } 282 283 // Save, Delete, Add 284 @Override 285 public void buttonActionPerformed(java.awt.event.ActionEvent ae) { 286 if (_track == null) { 287 return; 288 } 289 if (ae.getSource() == saveButton) { 290 log.debug("track save button activated"); 291 save(); 292 if (Setup.isCloseWindowOnSaveEnabled()) { 293 dispose(); 294 } 295 } 296 if (ae.getSource() == addLoadButton) { 297 String loadName = (String) comboBoxLoads.getSelectedItem(); 298 if (loadAndTypeCheckBox.isSelected()) { 299 loadName = comboBoxTypes.getSelectedItem() + CarLoad.SPLIT_CHAR + loadName; 300 } 301 _track.addLoadName(loadName); 302 selectNextItemComboBox(comboBoxLoads); 303 } 304 if (ae.getSource() == deleteLoadButton) { 305 String loadName = (String) comboBoxLoads.getSelectedItem(); 306 if (loadAndTypeCheckBox.isSelected()) { 307 loadName = comboBoxTypes.getSelectedItem() + CarLoad.SPLIT_CHAR + loadName; 308 } 309 _track.deleteLoadName(loadName); 310 selectNextItemComboBox(comboBoxLoads); 311 } 312 if (ae.getSource() == deleteAllLoadsButton) { 313 deleteAllLoads(); 314 } 315 if (ae.getSource() == addShipLoadButton) { 316 String loadName = (String) comboBoxShipLoads.getSelectedItem(); 317 if (shipLoadAndTypeCheckBox.isSelected()) { 318 loadName = comboBoxShipTypes.getSelectedItem() + CarLoad.SPLIT_CHAR + loadName; 319 } 320 _track.addShipLoadName(loadName); 321 selectNextItemComboBox(comboBoxShipLoads); 322 } 323 if (ae.getSource() == deleteShipLoadButton) { 324 String loadName = (String) comboBoxShipLoads.getSelectedItem(); 325 if (shipLoadAndTypeCheckBox.isSelected()) { 326 loadName = comboBoxShipTypes.getSelectedItem() + CarLoad.SPLIT_CHAR + loadName; 327 } 328 _track.deleteShipLoadName(loadName); 329 selectNextItemComboBox(comboBoxShipLoads); 330 } 331 if (ae.getSource() == deleteAllShipLoadsButton) { 332 deleteAllShipLoads(); 333 } 334 } 335 336 @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "GUI ease of use") 337 protected void save() { 338 checkForErrors(); 339 _track.setHoldCarsWithCustomLoadsEnabled(holdCars.isSelected()); 340 _track.setDisableLoadChangeEnabled(disableloadChange.isSelected()); 341 // save the last state of the "Use car type and load" checkbox 342 loadAndType = loadAndTypeCheckBox.isSelected(); 343 shipLoadAndType = shipLoadAndTypeCheckBox.isSelected(); 344 // save location file 345 OperationsXml.save(); 346 } 347 348 protected void updateButtons(boolean enabled) { 349 saveButton.setEnabled(enabled); 350 351 loadNameAll.setEnabled(enabled); 352 loadNameInclude.setEnabled(enabled); 353 loadNameExclude.setEnabled(enabled); 354 loadAndTypeCheckBox.setEnabled(enabled); 355 356 // enable ship options if any of the three generate loads from staging is selected 357 // or if there are any ship load restrictions for this track 358 boolean en = enabled 359 && (_track.isAddCustomLoadsAnyStagingTrackEnabled() || _track.isAddCustomLoadsAnySpurEnabled() || _track 360 .isAddCustomLoadsEnabled() || !_track.getShipLoadOption().equals(Track.ALL_LOADS)); 361 362 shipLoadNameAll.setEnabled(en); 363 shipLoadNameInclude.setEnabled(en); 364 shipLoadNameExclude.setEnabled(en); 365 shipLoadAndTypeCheckBox.setEnabled(en); 366 367 addShipLoadButton.setEnabled(en); 368 deleteShipLoadButton.setEnabled(en); 369 deleteAllShipLoadsButton.setEnabled(en); 370 371 comboBoxShipLoads.setEnabled(en); 372 comboBoxShipTypes.setEnabled(en); 373 } 374 375 @Override 376 public void radioButtonActionPerformed(java.awt.event.ActionEvent ae) { 377 log.debug("radio button activated"); 378 if (ae.getSource() == loadNameAll) { 379 _track.setLoadOption(Track.ALL_LOADS); 380 } 381 if (ae.getSource() == loadNameInclude) { 382 _track.setLoadOption(Track.INCLUDE_LOADS); 383 } 384 if (ae.getSource() == loadNameExclude) { 385 _track.setLoadOption(Track.EXCLUDE_LOADS); 386 } 387 if (ae.getSource() == shipLoadNameAll) { 388 _track.setShipLoadOption(Track.ALL_LOADS); 389 } 390 if (ae.getSource() == shipLoadNameInclude) { 391 _track.setShipLoadOption(Track.INCLUDE_LOADS); 392 } 393 if (ae.getSource() == shipLoadNameExclude) { 394 _track.setShipLoadOption(Track.EXCLUDE_LOADS); 395 } 396 } 397 398 // Car type combo box has been changed, show loads associated with this car type 399 @Override 400 public void comboBoxActionPerformed(java.awt.event.ActionEvent ae) { 401 updateLoadComboBoxes(); 402 } 403 404 private void updateLoadComboBoxes() { 405 String carType = (String) comboBoxTypes.getSelectedItem(); 406 InstanceManager.getDefault(CarLoads.class).updateComboBox(carType, comboBoxLoads); 407 carType = (String) comboBoxShipTypes.getSelectedItem(); 408 InstanceManager.getDefault(CarLoads.class).updateComboBox(carType, comboBoxShipLoads); 409 } 410 411 private void updateLoadNames() { 412 log.debug("Update load names"); 413 panelLoads.removeAll(); 414 if (_track != null) { 415 // set radio button 416 loadNameAll.setSelected(_track.getLoadOption().equals(Track.ALL_LOADS)); 417 loadNameInclude.setSelected(_track.getLoadOption().equals(Track.INCLUDE_LOADS)); 418 loadNameExclude.setSelected(_track.getLoadOption().equals(Track.EXCLUDE_LOADS)); 419 420 pLoadControls.setVisible(!loadNameAll.isSelected()); 421 422 if (!loadNameAll.isSelected()) { 423 int x = 0; 424 int y = 0; // vertical position in panel 425 426 int numberOfLoads = getNumberOfCheckboxesPerLine() / 2 + 1; 427 for (String loadName : _track.getLoadNames()) { 428 JLabel load = new JLabel(); 429 load.setText(loadName); 430 addItemTop(panelLoads, load, x++, y); 431 // limit the number of loads per line 432 if (x > numberOfLoads) { 433 y++; 434 x = 0; 435 } 436 } 437 revalidate(); 438 } 439 } else { 440 loadNameAll.setSelected(true); 441 } 442 panelLoads.repaint(); 443 panelLoads.revalidate(); 444 } 445 446 private void updateShipLoadNames() { 447 log.debug("Update ship load names"); 448 panelShipLoads.removeAll(); 449 if (_track != null) { 450 // set radio button 451 shipLoadNameAll.setSelected(_track.getShipLoadOption().equals(Track.ALL_LOADS)); 452 shipLoadNameInclude.setSelected(_track.getShipLoadOption().equals(Track.INCLUDE_LOADS)); 453 shipLoadNameExclude.setSelected(_track.getShipLoadOption().equals(Track.EXCLUDE_LOADS)); 454 455 pShipLoadControls.setVisible(!shipLoadNameAll.isSelected()); 456 457 if (!shipLoadNameAll.isSelected()) { 458 int x = 0; 459 int y = 0; // vertical position in panel 460 461 int numberOfLoads = getNumberOfCheckboxesPerLine() / 2 + 1; 462 for (String loadName : _track.getShipLoadNames()) { 463 JLabel load = new JLabel(); 464 load.setText(loadName); 465 addItemTop(panelShipLoads, load, x++, y); 466 // limit the number of loads per line 467 if (x > numberOfLoads) { 468 y++; 469 x = 0; 470 } 471 } 472 revalidate(); 473 } 474 } else { 475 shipLoadNameAll.setSelected(true); 476 } 477 panelShipLoads.repaint(); 478 panelShipLoads.revalidate(); 479 } 480 481 private void deleteAllLoads() { 482 if (_track != null) { 483 for (String loadName : _track.getLoadNames()) { 484 _track.deleteLoadName(loadName); 485 } 486 } 487 } 488 489 private void deleteAllShipLoads() { 490 if (_track != null) { 491 for (String loadName : _track.getShipLoadNames()) { 492 _track.deleteShipLoadName(loadName); 493 } 494 } 495 } 496 497 private void updateTypeComboBoxes() { 498 InstanceManager.getDefault(CarTypes.class).updateComboBox(comboBoxTypes); 499 // remove car types not serviced by this location and track 500 for (int i = comboBoxTypes.getItemCount() - 1; i >= 0; i--) { 501 String type = comboBoxTypes.getItemAt(i); 502 if (_track != null && !_track.isTypeNameAccepted(type)) { 503 comboBoxTypes.removeItem(type); 504 } 505 } 506 InstanceManager.getDefault(CarTypes.class).updateComboBox(comboBoxShipTypes); 507 // remove car types not serviced by this location and track 508 for (int i = comboBoxShipTypes.getItemCount() - 1; i >= 0; i--) { 509 String type = comboBoxShipTypes.getItemAt(i); 510 if (_track != null && !_track.isTypeNameAccepted(type)) { 511 comboBoxShipTypes.removeItem(type); 512 } 513 } 514 } 515 516 private void checkForErrors() { 517 if (_track.getLoadOption().equals(Track.INCLUDE_LOADS) && _track.getLoadNames().length == 0 518 || _track.getShipLoadOption().equals(Track.INCLUDE_LOADS) && _track.getShipLoadNames().length == 0) { 519 JmriJOptionPane.showMessageDialog(this, Bundle.getMessage("ErrorNeedLoads"), Bundle.getMessage("ErrorNoLoads"), 520 JmriJOptionPane.ERROR_MESSAGE); 521 } 522 } 523 524 @Override 525 public void dispose() { 526 if (_track != null) { 527 _track.removePropertyChangeListener(this); 528 } 529 _location.removePropertyChangeListener(this); 530 InstanceManager.getDefault(CarLoads.class).removePropertyChangeListener(this); 531 InstanceManager.getDefault(CarTypes.class).removePropertyChangeListener(this); 532 super.dispose(); 533 } 534 535 @Override 536 public void propertyChange(java.beans.PropertyChangeEvent e) { 537 if (Control.SHOW_PROPERTY) { 538 log.debug("Property change ({}) old: ({}) new: ({})", e.getPropertyName(), e.getOldValue(), e.getNewValue()); // NOI18N 539 } 540 if (e.getPropertyName().equals(Location.TYPES_CHANGED_PROPERTY) 541 || e.getPropertyName().equals(CarTypes.CARTYPES_CHANGED_PROPERTY) 542 || e.getPropertyName().equals(Track.TYPES_CHANGED_PROPERTY)) { 543 updateTypeComboBoxes(); 544 } 545 if (e.getPropertyName().equals(CarLoads.LOAD_NAME_CHANGED_PROPERTY) 546 || e.getPropertyName().equals(CarLoads.LOAD_CHANGED_PROPERTY)) { 547 updateLoadComboBoxes(); 548 updateLoadNames(); 549 updateShipLoadNames(); 550 } 551 if (e.getPropertyName().equals(Track.LOADS_CHANGED_PROPERTY)) { 552 updateLoadNames(); 553 updateShipLoadNames(); 554 } 555 if (_track != null && e.getPropertyName().equals(Track.LOAD_OPTIONS_CHANGED_PROPERTY)) { 556 updateButtons(true); 557 } 558 if (_track != null && e.getPropertyName().equals(Track.HOLD_CARS_CHANGED_PROPERTY)) { 559 holdCars.setSelected(_track.isHoldCarsWithCustomLoadsEnabled()); 560 } 561 if (_track != null && e.getPropertyName().equals(Track.LOAD_OPTIONS_CHANGED_PROPERTY)) { 562 disableloadChange.setSelected(_track.isDisableLoadChangeEnabled()); 563 } 564 } 565 566 private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TrackLoadEditFrame.class); 567}