From: <dan...@us...> - 2013-02-27 18:39:21
|
Revision: 22832 http://sourceforge.net/p/jmri/code/22832 Author: dan_boudreau Date: 2013-02-27 18:39:13 +0000 (Wed, 27 Feb 2013) Log Message: ----------- Change "Siding" references to "Spur". and some refactoring. Modified Paths: -------------- trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTrackTypeAction.java trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTracksTypeAction.java trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle.properties trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_en_GB.properties trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_it.properties trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_ja_JP.properties trunk/jmri/java/src/jmri/jmrit/operations/locations/Location.java trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationEditFrame.java trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationManager.java trunk/jmri/java/src/jmri/jmrit/operations/locations/PrintLocationsAction.java trunk/jmri/java/src/jmri/jmrit/operations/locations/ScheduleManager.java trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesByLoadFrame.java trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesTableModel.java trunk/jmri/java/src/jmri/jmrit/operations/locations/StagingEditFrame.java trunk/jmri/java/src/jmri/jmrit/operations/locations/Track.java trunk/jmri/java/src/jmri/jmrit/operations/locations/TrackLoadEditFrame.java trunk/jmri/java/src/jmri/jmrit/operations/rollingstock/cars/Car.java trunk/jmri/java/src/jmri/jmrit/operations/rollingstock/cars/CarSetFrame.java trunk/jmri/java/src/jmri/jmrit/operations/rollingstock/cars/JmritOperationsCarsBundle.properties trunk/jmri/java/src/jmri/jmrit/operations/rollingstock/cars/JmritOperationsCarsBundle_it.properties trunk/jmri/java/src/jmri/jmrit/operations/rollingstock/cars/JmritOperationsCarsBundle_ja_JP.properties trunk/jmri/java/src/jmri/jmrit/operations/router/JmritOperationsRouterBundle.properties trunk/jmri/java/src/jmri/jmrit/operations/router/JmritOperationsRouterBundle_it.properties trunk/jmri/java/src/jmri/jmrit/operations/router/Router.java trunk/jmri/java/src/jmri/jmrit/operations/setup/JmritOperationsSetupBundle.properties trunk/jmri/java/src/jmri/jmrit/operations/setup/JmritOperationsSetupBundle_it.properties trunk/jmri/java/src/jmri/jmrit/operations/setup/OptionFrame.java trunk/jmri/java/src/jmri/jmrit/operations/setup/Setup.java trunk/jmri/java/src/jmri/jmrit/operations/setup/Xml.java trunk/jmri/java/src/jmri/jmrit/operations/trains/JmritOperationsTrainsBundle.properties trunk/jmri/java/src/jmri/jmrit/operations/trains/JmritOperationsTrainsBundle_it.properties trunk/jmri/java/src/jmri/jmrit/operations/trains/TrainBuilder.java trunk/jmri/java/test/jmri/jmrit/operations/locations/OperationsLocationsGuiTest.java trunk/jmri/java/test/jmri/jmrit/operations/locations/OperationsLocationsTest.java trunk/jmri/java/test/jmri/jmrit/operations/locations/OperationsPoolTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/OperationsLoggerTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/OperationsRollingStockTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/cars/OperationsCarsGuiTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/cars/OperationsCarsTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/engines/OperationsEnginesGuiTest.java trunk/jmri/java/test/jmri/jmrit/operations/rollingstock/engines/OperationsEnginesTest.java trunk/jmri/java/test/jmri/jmrit/operations/router/OperationsCarRouterTest.java trunk/jmri/java/test/jmri/jmrit/operations/setup/OperationsSetupGuiTest.java trunk/jmri/java/test/jmri/jmrit/operations/trains/OperationsTrainsTest.java Added Paths: ----------- trunk/jmri/java/src/jmri/jmrit/operations/locations/SpurEditFrame.java trunk/jmri/java/src/jmri/jmrit/operations/locations/SpurTableModel.java Removed Paths: ------------- trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingEditFrame.java trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingTableModel.java Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTrackTypeAction.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTrackTypeAction.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTrackTypeAction.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -38,7 +38,7 @@ class ChangeTrackFrame extends OperationsFrame{ // radio buttons - JRadioButton sidingRadioButton = new JRadioButton(Bundle.getMessage("Siding")); + JRadioButton spurRadioButton = new JRadioButton(Bundle.getMessage("Spur")); JRadioButton yardRadioButton = new JRadioButton(Bundle.getMessage("Yard")); JRadioButton interchangeRadioButton = new JRadioButton(Bundle.getMessage("Interchange")); ButtonGroup group = new ButtonGroup(); @@ -67,18 +67,18 @@ JPanel p1 = new JPanel(); p1.setLayout(new GridBagLayout()); p1.setBorder(BorderFactory.createTitledBorder(MessageFormat.format(Bundle.getMessage("TrackType"),new Object[]{trackName}))); - addItem(p1, sidingRadioButton, 0, 0); + addItem(p1, spurRadioButton, 0, 0); addItem(p1, yardRadioButton, 1, 0); addItem(p1, interchangeRadioButton, 2, 0); addItem(p1, saveButton, 1, 1); // group and set current track type _trackType = tef._track.getLocType(); - group.add(sidingRadioButton); + group.add(spurRadioButton); group.add(yardRadioButton); group.add(interchangeRadioButton); - sidingRadioButton.setSelected(_trackType.equals(Track.SIDING)); + spurRadioButton.setSelected(_trackType.equals(Track.SPUR)); yardRadioButton.setSelected(_trackType.equals(Track.YARD)); interchangeRadioButton.setSelected(_trackType.equals(Track.INTERCHANGE)); @@ -99,8 +99,8 @@ public void buttonActionPerformed(java.awt.event.ActionEvent ae) { if (ae.getSource() == saveButton){ // check to see if button has changed - if (sidingRadioButton.isSelected() && !_trackType.equals(Track.SIDING)){ - changeTrack(Track.SIDING); + if (spurRadioButton.isSelected() && !_trackType.equals(Track.SPUR)){ + changeTrack(Track.SPUR); } else if (yardRadioButton.isSelected() && !_trackType.equals(Track.YARD)){ changeTrack(Track.YARD); } else if (interchangeRadioButton.isSelected() && !_trackType.equals(Track.INTERCHANGE)){ Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTracksTypeAction.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTracksTypeAction.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/ChangeTracksTypeAction.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -40,7 +40,7 @@ class ChangeTracksFrame extends OperationsFrame{ // radio buttons - JRadioButton sidingRadioButton = new JRadioButton(Bundle.getMessage("Siding")); + JRadioButton spurRadioButton = new JRadioButton(Bundle.getMessage("Spur")); JRadioButton yardRadioButton = new JRadioButton(Bundle.getMessage("Yard")); JRadioButton interchangeRadioButton = new JRadioButton(Bundle.getMessage("Interchange")); JRadioButton stagingRadioButton = new JRadioButton(Bundle.getMessage("Staging")); @@ -69,7 +69,7 @@ JPanel p1 = new JPanel(); p1.setLayout(new GridBagLayout()); p1.setBorder(BorderFactory.createTitledBorder(MessageFormat.format(Bundle.getMessage("TrackType"),new Object[]{_location.getName()}))); - addItem(p1, sidingRadioButton, 0, 0); + addItem(p1, spurRadioButton, 0, 0); addItem(p1, yardRadioButton, 1, 0); addItem(p1, interchangeRadioButton, 2, 0); addItem(p1, stagingRadioButton, 3, 0); @@ -77,7 +77,7 @@ // group and set current track type ButtonGroup group = new ButtonGroup(); - group.add(sidingRadioButton); + group.add(spurRadioButton); group.add(yardRadioButton); group.add(interchangeRadioButton); group.add(stagingRadioButton); @@ -96,8 +96,8 @@ public void buttonActionPerformed(java.awt.event.ActionEvent ae) { if (ae.getSource() == saveButton){ // check to see if button has changed - if (sidingRadioButton.isSelected()){ - changeTracks(Track.SIDING); + if (spurRadioButton.isSelected()){ + changeTracks(Track.SPUR); } else if (yardRadioButton.isSelected()){ changeTracks(Track.YARD); } else if (interchangeRadioButton.isSelected()){ Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle.properties =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle.properties 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle.properties 2013-02-27 18:39:13 UTC (rev 22832) @@ -64,7 +64,7 @@ TrainTrack = This track is serviced by trains traveling TrainYard = This yard is serviced by trains traveling #TrainInterchange = This interchange track is serviced by trains traveling -TrainSiding = This spur is serviced by trains traveling +TrainSpur = This spur is serviced by trains traveling TrainStaging = This staging track is serviced by trains traveling North = North South = South @@ -77,13 +77,9 @@ ShipLoadsTrack = Select loads shipped from this track TypeAndLoad = Use car type and load TypesYard = Select the rolling stock serviced by this yard -#RoadsYard = Select the roads serviced by this yard TypesInterchange = Select the rolling stock serviced by this classification/interchange track -#RoadsInterchange = Select the roads serviced by this interchange track -TypesSiding = Select the rolling stock serviced by this spur -#RoadsSiding = Select the roads serviced by this spur +TypesSpur = Select the rolling stock serviced by this spur TypesStaging = Select the rolling stock serviced by this staging track -#RoadsStaging = Select the roads for this staging track TrainsOrRoutesDrops = Select trains or routes for car set outs TrainsOrRoutesPickups = Select trains or routes for car pick ups SelectTrainArrival = Select trains or routes for arrivals @@ -98,7 +94,7 @@ ShipLoadOption = Ship Load Option Yards = Yards -Sidings = Spurs +Spurs = Spurs Interchange = Classification/Interchange Staging = Staging only @@ -116,10 +112,10 @@ EditInterchange = Edit Classification/Interchange Track SaveInterchange = Save Classification/Interchange Track -AddSiding = Add Spur Track -DeleteSiding = Delete Spur Track -EditSiding = Edit Spur Track -SaveSiding = Save Spur Track +AddSpur = Add Spur Track +DeleteSpur = Delete Spur Track +EditSpur = Edit Spur Track +SaveSpur = Save Spur Track AddStaging = Add Staging Track EditStaging = Edit Staging Track @@ -151,7 +147,7 @@ DeleteAll = Delete All YardName = Yard Name -SidingName = Spur Name +SpurName = Spur Name InterchangeName = Classification/Interchange Name StagingName = Staging Name TrackName = Track Name @@ -292,7 +288,7 @@ empty = Error <empty> ScheduleNameLengthMax = Schedule name must be less than {0} characters Status = Status -StatusSiding = Status Spur +StatusSpur = Status Spur Okay = Okay SwapCarLoads = Swap default loads and empties EmptyDefaultCarLoads = Empty cars with default loads @@ -334,7 +330,7 @@ # Change Track Type TrackType = Select Desired Track Type for {0} -Siding = Spur +Spur = Spur Yard = Yard # Location Switch List Statuses @@ -363,8 +359,17 @@ schedule = schedule load = load capacity = capacity -#custom = custom +custom = custom +carHasA = car has a {0} {1} ({2}) +requestCar = requests car +requestCarOnly = requests car only on +match = match +sequential = sequential +noMatch = no match +matchMessage = ({0}) in match mode, no match +sequentialMessage = ({0}) in {1} mode, car ({2}) type({3}) timetable({4}) road({5}) load({6}) does not match: type({7}) timetable({8}) road({9}) receive({10}) + # Physical Location Tools Dialog MenuSetPhysicalLocation = Set Physical Locations TipSaveButton = Saves the physical location coordinates for the selected location Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_en_GB.properties =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_en_GB.properties 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_en_GB.properties 2013-02-27 18:39:13 UTC (rev 22832) @@ -17,13 +17,11 @@ TrainTrack = This track is serviced by trains travelling TrainYard = This yard is serviced by trains travelling TrainInterchange = This interchange track is serviced by trains travelling -TrainSiding = This spur is serviced by trains travelling +TrainSpur = This spur is serviced by trains travelling TrainStaging = This staging track is serviced by trains travelling RoadsTrack = Select the railways serviced by this track RoadsYard = Select the railways serviced by this yard -#RoadsInterchange = Select the railways serviced by this interchange track -#RoadsSiding = Select the railways serviced by this spur RoadsStaging = Select the railways for this staging track TrainsOrRoutesDrops = Select trains or routes for wagon set outs TrainsOrRoutesPickups = Select trains or routes for wagon pick ups Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_it.properties =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_it.properties 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_it.properties 2013-02-27 18:39:13 UTC (rev 22832) @@ -66,7 +66,7 @@ TrainTrack = Questo Binario \xE8 servito da treni che viaggiano TrainYard = Questo Scalo \xE8 servito da treni che viaggiano #TrainInterchange = Questo Binario di Interscambio \xE8 servito da treni che viaggiano -TrainSiding = Questo Raccordo \xE8 servito da treni che viaggiano +TrainSpur = Questo Raccordo \xE8 servito da treni che viaggiano TrainStaging = Questo binario di deposito \xE8 servito da treni che viaggiano North = Nord South = Sud @@ -78,13 +78,9 @@ LoadsTrack = Selezionare carichi serviti da questo binario TypeAndLoad = Usa tipo carro e carico TypesYard = Selezionare il materiale rotabile servita da questo scalo -#RoadsYard = Selezionare le Compagnie servite da questo scalo TypesInterchange = Selezionare il materiale rotabile servito da questo binario di classificazione/interscambio -#RoadsInterchange = Selezionare le Compagnie servite da questo binario di interscambio -TypesSiding = Selezionare il materiale rotabile servito da questo Raccordo -#RoadsSiding = Selezionare le Compagnie servite da questo Raccordo +TypesSpur = Selezionare il materiale rotabile servito da questo Raccordo TypesStaging = Selezionare il materiale rotabile servito da questo binario di deposito -#RoadsStaging = Selezionare le Compagnie per per questo binario di deposito TrainsOrRoutesDrops = Selezionare i treni o percorsi per Sgancio carri TrainsOrRoutesPickups = Selezionare i treni o percorsi per prelievo carri SelectTrainArrival = Selezionare i treni o percorsi per gli arrivi @@ -98,7 +94,7 @@ LoadOption = Opzione Carico Yards = Scali -Sidings = Raccordi +Spurs = Raccordi Interchange = Classificazione/interscambio Staging = Solo deposito @@ -116,10 +112,10 @@ EditInterchange = Modifica Binario Classificazione/interscambio SaveInterchange = Salva Binario Classificazione/interscambio -AddSiding = Aggiungi Raccordo -DeleteSiding = Cancella Raccordo -EditSiding = Modifica Raccordo -SaveSiding = Salva Raccordo +AddSpur = Aggiungi Raccordo +DeleteSpur = Cancella Raccordo +EditSpur = Modifica Raccordo +SaveSpur = Salva Raccordo AddStaging = Aggiungi Binario deposito EditStaging = Modifica Binario deposito @@ -149,7 +145,7 @@ DeleteAll = Cancella tutti YardName = Nome Scalo -SidingName = Nome Raccordo +SpurName = Nome Raccordo InterchangeName = Nome Classificazione/interscambio StagingName = Nome deposito TrackName = Nome Binario @@ -285,7 +281,7 @@ empty = Errore <vuoto> ScheduleNameLengthMax = Nome Pianificazione deve essere minore di {0} caratteri Status = Stato -StatusSiding = Stato Raccordo +StatusSpur = Stato Raccordo Okay = Ok SwapCarLoads = Scambia carichi di default e vuoti EmptyDefaultCarLoads = Carri vuoti con carichi di default @@ -327,7 +323,7 @@ # Change Track Type TrackType = Selezionare il tipo di binario desiderato per {0} -Siding = Raccordo +Spur = Raccordo Yard = Scalo # Location Switch List Statuses @@ -356,8 +352,17 @@ schedule = pianificazione load = carico capacity = capacit\xE0 -#custom = personalizzato +custom = personalizzato +CarHasA = carro ha un {0} {1} ({2}) +requestCar = richiesta carro +requestCarOnly = richiesta carro solo su + + + + + + # Physical Location Tools Dialog MenuSetPhysicalLocation = Imposta localit\xE0 fisiche TipSaveButton = Salva le coordinate della localit\xE0 fisica per la localit\xE0 selezionata Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_ja_JP.properties =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_ja_JP.properties 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/JmritOperationsLocationsBundle_ja_JP.properties 2013-02-27 18:39:13 UTC (rev 22832) @@ -41,7 +41,7 @@ TrainTrack = This track is serviced by trains traveling TrainYard = This yard is serviced by trains traveling #TrainInterchange= \u3053\u306E\u30A4\u30F3\u30BF\u30FC\u30C1\u30A7\u30F3\u30B8\u30C8\u30E9\u30C3\u30AF\u306F is serviced by trains traveling -TrainSiding = This spur is serviced by trains traveling +TrainSpur = This spur is serviced by trains traveling TrainStaging = \u3053\u306E\u30B9\u30C6\u30FC\u30B8\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u306Fis serviced by trains traveling North = \u5317 South = \u5357 @@ -51,13 +51,9 @@ TypesTrack = Select the rolling stock serviced by this track RoadsTrack = Select the roads serviced by this track TypesYard = Select the rolling stock serviced by this yard -#RoadsYard = Select the roads serviced by this yard TypesInterchange = Select the rolling stock serviced by this interchange track -#RoadsInterchange = Select the roads serviced by this interchange track -TypesSiding = Select the rolling stock serviced by this spur -#RoadsSiding = Select the roads serviced by this spur +TypesSpur = Select the rolling stock serviced by this spur TypesStaging = Select the rolling stock serviced by this staging track -#RoadsStaging = Select the roads for this staging track TrainsOrRoutesDrops = \u8ECA\u4E21\u3092\u8A2D\u7F6E\u3059\u308B\u5217\u8ECA\u307E\u305F\u306F\u8DEF\u7DDA\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044\u3002 TrainsOrRoutesPickups = \u8ECA\u4E21\u3092\u64A4\u53BB\u3059\u308B\u5217\u8ECA\u307E\u305F\u306F\u8DEF\u7DDA\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044\u3002 Ops = \u3053\u306E\u4F4D\u7F6E\u3067\u306E\u64CD\u4F5C: @@ -66,7 +62,7 @@ Optional = -------------------------------- Optional ------------------------------------ Yards = \u30E4\u30FC\u30C9 -Sidings = \u6E21\u308A\u7DDA +Spurs = \u6E21\u308A\u7DDA Interchange = \u30A4\u30F3\u30BF\u30FC\u30C1\u30A7\u30F3\u30B8 Staging = Staging only @@ -84,10 +80,10 @@ EditInterchange = \u30A4\u30F3\u30BF\u30FC\u30C1\u30A7\u30F3\u30B8\u30C8\u30E9\u30C3\u30AF\u3092\u7DE8\u96C6 SaveInterchange = \u30A4\u30F3\u30BF\u30FC\u30C1\u30A7\u30F3\u30B8\u30C8\u30E9\u30C3\u30AF\u3092\u4FDD\u5B58 -AddSiding = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u8FFD\u52A0 -DeleteSiding = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u524A\u9664 -EditSiding = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u7DE8\u96C6 -SaveSiding = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u4FDD\u5B58 +AddSpur = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u8FFD\u52A0 +DeleteSpur = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u524A\u9664 +EditSpur = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u7DE8\u96C6 +SaveSpur = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u4FDD\u5B58 AddStaging = \u30B9\u30C6\u30FC\u30B8\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u8FFD\u52A0 DeleteStaging = \u30B9\u30C6\u30FC\u30B8\u30F3\u30B0\u30C8\u30E9\u30C3\u30AF\u3092\u524A\u9664 @@ -109,7 +105,7 @@ Routes = \u30EB\u30FC\u30C8 YardName = \u30E4\u30FC\u30C9\u540D -SidingName = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u540D +SpurName = \u30B5\u30A4\u30C7\u30A3\u30F3\u30B0\u540D InterchangeName = \u30A4\u30F3\u30BF\u30FC\u30C1\u30A7\u30F3\u30B8\u540D StagingName = \u30B9\u30C6\u30FC\u30B8\u30F3\u30B0\u540D TrackName = \u30C8\u30E9\u30C3\u30AF\u540D @@ -180,7 +176,7 @@ empty = \u30A8\u30E9\u30FC <empty> ScheduleNameLengthMax = Schedule name must be less than {0} characters Status = \u30B9\u30C6\u30A4\u30BF\u30B9 -StatusSiding = Status Spur +StatusSpur = Status Spur Okay = Okay SwapCarLoads = Swap default loads and empties EmptyCarLoads = Empty cars with scheduled loads Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/Location.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/Location.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/Location.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -559,7 +559,7 @@ /** * Sort ids by track location name. Returns a list of ids of a given track type. * If type is null returns all track ids for the location. - * @param type track type: Track.YARD, Track.SIDING, Track.INTERCHANGE, Track.STAGING + * @param type track type: Track.YARD, Track.SPUR, Track.INTERCHANGE, Track.STAGING * @return list of track ids ordered by name */ public List<String> getTrackIdsByNameList(String type) { @@ -598,7 +598,7 @@ * Sort ids by track moves. Returns a list of ids of a given track type. * If type is null returns all track ids for the location are returned. * Tracks with schedules are placed at the start of the list. - * @param type track type: Track.YARD, Track.SIDING, Track.INTERCHANGE, Track.STAGING + * @param type track type: Track.YARD, Track.SPUR, Track.INTERCHANGE, Track.STAGING * @return list of track ids ordered by moves */ public List<String> getTrackIdsByMovesList(String type) { Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationEditFrame.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationEditFrame.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationEditFrame.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -32,9 +32,9 @@ YardTableModel yardModel = new YardTableModel(); JTable yardTable = new JTable(yardModel); JScrollPane yardPane; - SidingTableModel sidingModel = new SidingTableModel(); - JTable sidingTable = new JTable(sidingModel); - JScrollPane sidingPane; + SpurTableModel spurModel = new SpurTableModel(); + JTable spurTable = new JTable(spurModel); + JScrollPane spurPane; InterchangeTableModel interchangeModel = new InterchangeTableModel(); JTable interchangeTable = new JTable(interchangeModel); JScrollPane interchangePane; @@ -59,7 +59,7 @@ JButton deleteLocationButton = new JButton(Bundle.getMessage("DeleteLocation")); JButton addLocationButton = new JButton(Bundle.getMessage("AddLocation")); JButton addYardButton = new JButton(Bundle.getMessage("AddYard")); - JButton addSidingButton = new JButton(Bundle.getMessage("AddSiding")); + JButton addSpurButton = new JButton(Bundle.getMessage("AddSpur")); JButton addInterchangeButton = new JButton(Bundle.getMessage("AddInterchange")); JButton addStagingButton = new JButton(Bundle.getMessage("AddStaging")); @@ -74,7 +74,7 @@ JRadioButton stageRadioButton = new JRadioButton(Bundle.getMessage("Staging")); JRadioButton interchangeRadioButton = new JRadioButton(Bundle.getMessage("Interchange")); JRadioButton yardRadioButton = new JRadioButton(Bundle.getMessage("Yards")); - JRadioButton sidingRadioButton = new JRadioButton(Bundle.getMessage("Sidings")); + JRadioButton spurRadioButton = new JRadioButton(Bundle.getMessage("Spurs")); // text field JTextField locationNameTextField = new JTextField(20); @@ -110,9 +110,9 @@ yardPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); yardPane.setBorder(BorderFactory.createTitledBorder("")); - sidingPane = new JScrollPane(sidingTable); - sidingPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - sidingPane.setBorder(BorderFactory.createTitledBorder("")); + spurPane = new JScrollPane(spurTable); + spurPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + spurPane.setBorder(BorderFactory.createTitledBorder("")); interchangePane = new JScrollPane(interchangeTable); interchangePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); @@ -124,7 +124,7 @@ // button group ButtonGroup opsGroup = new ButtonGroup(); - opsGroup.add(sidingRadioButton); + opsGroup.add(spurRadioButton); opsGroup.add(yardRadioButton); opsGroup.add(interchangeRadioButton); opsGroup.add(stageRadioButton); @@ -137,14 +137,14 @@ locationNameTextField.setText(_location.getName()); commentTextArea.setText(_location.getComment()); yardModel.initTable(yardTable, location); - sidingModel.initTable(sidingTable, location); + spurModel.initTable(spurTable, location); interchangeModel.initTable(interchangeTable, location); stagingModel.initTable(stagingTable, location); _location.addPropertyChangeListener(this); locationName = _location.getName(); if (_location.getLocationOps() == Location.NORMAL){ - if (sidingModel.getRowCount()>0) - sidingRadioButton.setSelected(true); + if (spurModel.getRowCount()>0) + spurRadioButton.setSelected(true); else if (yardModel.getRowCount()>0) yardRadioButton.setSelected(true); else if (interchangeModel.getRowCount()>0) @@ -152,14 +152,14 @@ else if (stagingModel.getRowCount()>0) stageRadioButton.setSelected(true); else - sidingRadioButton.setSelected(true); + spurRadioButton.setSelected(true); }else{ stageRadioButton.setSelected(true); } setTrainDirectionBoxes(); } else { enableButtons(false); - sidingRadioButton.setSelected(true); + spurRadioButton.setSelected(true); } setVisibleLocations(); @@ -201,7 +201,7 @@ JPanel pOp = new JPanel(); pOp.setLayout(new GridBagLayout()); pOp.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Ops"))); - pOp.add(sidingRadioButton); + pOp.add(spurRadioButton); pOp.add(yardRadioButton); pOp.add(interchangeRadioButton); pOp.add(stageRadioButton); @@ -225,8 +225,8 @@ getContentPane().add(pOp); getContentPane().add(yardPane); getContentPane().add(addYardButton); - getContentPane().add(sidingPane); - getContentPane().add(addSidingButton); + getContentPane().add(spurPane); + getContentPane().add(addSpurButton); getContentPane().add(interchangePane); getContentPane().add(addInterchangeButton); getContentPane().add(stagingPane); @@ -242,14 +242,14 @@ addButtonAction(addLocationButton); addButtonAction(saveLocationButton); addButtonAction(addYardButton); - addButtonAction(addSidingButton); + addButtonAction(addSpurButton); addButtonAction(addInterchangeButton); addButtonAction(addStagingButton); // add tool tips autoSelectButton.setToolTipText(Bundle.getMessage("TipAutoSelect")); - addRadioButtonAction(sidingRadioButton); + addRadioButtonAction(spurRadioButton); addRadioButtonAction(yardRadioButton); addRadioButtonAction(interchangeRadioButton); addRadioButtonAction(stageRadioButton); @@ -288,7 +288,7 @@ } YardEditFrame yef = null; - SidingEditFrame sef = null; + SpurEditFrame sef = null; InterchangeEditFrame ief = null; StagingEditFrame stef = null; @@ -299,10 +299,10 @@ yef.initComponents(_location, null); yef.setTitle(Bundle.getMessage("AddYard")); } - if (ae.getSource() == addSidingButton){ - sef = new SidingEditFrame(); + if (ae.getSource() == addSpurButton){ + sef = new SpurEditFrame(); sef.initComponents(_location, null); - sef.setTitle(Bundle.getMessage("AddSiding")); + sef.setTitle(Bundle.getMessage("AddSpur")); } if (ae.getSource() == addInterchangeButton){ ief = new InterchangeEditFrame(); @@ -351,7 +351,7 @@ } yardModel.dispose(); - sidingModel.dispose(); + spurModel.dispose(); interchangeModel.dispose(); stagingModel.dispose(); @@ -402,7 +402,7 @@ return; Location location = manager.newLocation(locationNameTextField.getText()); yardModel.initTable(yardTable, location); - sidingModel.initTable(sidingTable, location); + spurModel.initTable(spurTable, location); interchangeModel.initTable(interchangeTable, location); stagingModel.initTable(stagingTable, location); _location = location; @@ -420,7 +420,7 @@ _location.setName(locationNameTextField.getText()); _location.setComment(commentTextArea.getText()); - if (sidingRadioButton.isSelected() || yardRadioButton.isSelected() || interchangeRadioButton.isSelected()){ + if (spurRadioButton.isSelected() || yardRadioButton.isSelected() || interchangeRadioButton.isSelected()){ _location.setLocationOps(Location.NORMAL); } if (stageRadioButton.isSelected()){ @@ -474,7 +474,7 @@ setButton.setEnabled(enabled); autoSelectButton.setEnabled(enabled); addYardButton.setEnabled(enabled); - addSidingButton.setEnabled(enabled); + addSpurButton.setEnabled(enabled); addInterchangeButton.setEnabled(enabled); addStagingButton.setEnabled(enabled); saveLocationButton.setEnabled(enabled); @@ -482,7 +482,7 @@ // the inverse! addLocationButton.setEnabled(!enabled); // enable radio buttons - sidingRadioButton.setEnabled(enabled); + spurRadioButton.setEnabled(enabled); yardRadioButton.setEnabled(enabled); interchangeRadioButton.setEnabled(enabled); stageRadioButton.setEnabled(enabled); @@ -502,24 +502,24 @@ addStagingButton.setVisible(stageRadioButton.isSelected()); yardPane.setVisible(yardRadioButton.isSelected()); addYardButton.setVisible(yardRadioButton.isSelected()); - sidingPane.setVisible(sidingRadioButton.isSelected()); - addSidingButton.setVisible(sidingRadioButton.isSelected()); + spurPane.setVisible(spurRadioButton.isSelected()); + addSpurButton.setVisible(spurRadioButton.isSelected()); } private void setEnabledLocations(){ - if (sidingModel.getRowCount()>0 || yardModel.getRowCount()>0 || interchangeModel.getRowCount()>0){ + if (spurModel.getRowCount()>0 || yardModel.getRowCount()>0 || interchangeModel.getRowCount()>0){ if(stageRadioButton.isSelected()) - sidingRadioButton.setSelected(true); + spurRadioButton.setSelected(true); stageRadioButton.setEnabled(false); } else if (stagingModel.getRowCount()>0){ stageRadioButton.setSelected(true); - sidingRadioButton.setEnabled(false); + spurRadioButton.setEnabled(false); yardRadioButton.setEnabled(false); interchangeRadioButton.setEnabled(false); } else { - sidingRadioButton.setEnabled(true); + spurRadioButton.setEnabled(true); yardRadioButton.setEnabled(true); interchangeRadioButton.setEnabled(true); stageRadioButton.setEnabled(true); @@ -680,7 +680,7 @@ CarTypes.instance().removePropertyChangeListener(this); EngineTypes.instance().removePropertyChangeListener(this); yardModel.dispose(); - sidingModel.dispose(); + spurModel.dispose(); interchangeModel.dispose(); stagingModel.dispose(); if (lctf != null) Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationManager.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationManager.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/LocationManager.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -221,7 +221,7 @@ * Returns all tracks of type * * @param type - * Siding, Yard, Interchange, Staging, or null (returns all track types) + * Spur, Yard, Interchange, Staging, or null (returns all track types) * @return List of tracks ordered by use */ public List<Track> getTracks(String type) { Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/PrintLocationsAction.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/PrintLocationsAction.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/PrintLocationsAction.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -136,15 +136,15 @@ } } - List<String> sidings = location.getTrackIdsByNameList(Track.SIDING); - if (sidings.size() > 0) { + List<String> spurs = location.getTrackIdsByNameList(Track.SPUR); + if (spurs.size() > 0) { // header - writer.write(SPACE + Bundle.getMessage("SidingName") + NEW_LINE); - for (int k = 0; k < sidings.size(); k++) { - Track siding = location.getTrackById(sidings.get(k)); - writer.write(getTrackString(siding)); - numberCars += siding.getNumberCars(); - numberEngines += siding.getNumberEngines(); + writer.write(SPACE + Bundle.getMessage("SpurName") + NEW_LINE); + for (int k = 0; k < spurs.size(); k++) { + Track spur = location.getTrackById(spurs.get(k)); + writer.write(getTrackString(spur)); + numberCars += spur.getNumberCars(); + numberEngines += spur.getNumberEngines(); } } @@ -198,7 +198,7 @@ private void printSchedulesSelected() throws IOException { List<String> locations = manager.getLocationsByNameList(); String s = padOutString(Bundle.getMessage("Schedules"), MAX_NAME_LENGTH) + " " + Bundle.getMessage("Location") + " - " - + Bundle.getMessage("SidingName") + NEW_LINE; + + Bundle.getMessage("SpurName") + NEW_LINE; writer.write(s); ScheduleManager sm = ScheduleManager.instance(); List<String> schedules = sm.getSchedulesByNameList(); @@ -206,13 +206,13 @@ Schedule schedule = sm.getScheduleById(schedules.get(i)); for (int j = 0; j < locations.size(); j++) { Location location = manager.getLocationById(locations.get(j)); - List<String> sidings = location.getTrackIdsByNameList(Track.SIDING); - for (int k = 0; k < sidings.size(); k++) { - Track siding = location.getTrackById(sidings.get(k)); - if (siding.getScheduleId().equals(schedule.getId())) { + List<String> spurs = location.getTrackIdsByNameList(Track.SPUR); + for (int k = 0; k < spurs.size(); k++) { + Track spur = location.getTrackById(spurs.get(k)); + if (spur.getScheduleId().equals(schedule.getId())) { // pad out schedule name - s = padOutString(schedule.getName(), MAX_NAME_LENGTH) + " " + location.getName() + " - " + siding.getName(); - String status = siding.checkScheduleValid(); + s = padOutString(schedule.getName(), MAX_NAME_LENGTH) + " " + location.getName() + " - " + spur.getName(); + String status = spur.checkScheduleValid(); if (!status.equals("")) { StringBuffer buf = new StringBuffer(s); for (int m = s.length(); m < 63; m++) { @@ -227,22 +227,22 @@ writer.write(s); // show the schedule's mode String mode = Bundle.getMessage("Sequential"); - if (siding.getScheduleMode() == Track.MATCH) + if (spur.getScheduleMode() == Track.MATCH) mode = Bundle.getMessage("Match"); s = padOutString("", MAX_NAME_LENGTH)+ SPACE + Bundle.getMessage("ScheduleMode") + ": " + mode + NEW_LINE; writer.write(s); // show alternate track if there's one - if (siding.getAlternativeTrack() != null) { + if (spur.getAlternativeTrack() != null) { s = padOutString("", MAX_NAME_LENGTH)+ SPACE - + MessageFormat.format(Bundle.getMessage("AlternateTrackName"), new Object[] { siding + + MessageFormat.format(Bundle.getMessage("AlternateTrackName"), new Object[] { spur .getAlternativeTrack().getName() }) + NEW_LINE; writer.write(s); } // show custom loads from staging if not 100% - if (siding.getReservationFactor() != 100) { + if (spur.getReservationFactor() != 100) { s = padOutString("", MAX_NAME_LENGTH)+ SPACE - + MessageFormat.format(Bundle.getMessage("PercentageStaging"), new Object[] { siding + + MessageFormat.format(Bundle.getMessage("PercentageStaging"), new Object[] { spur .getReservationFactor() }) + NEW_LINE; writer.write(s); } @@ -276,11 +276,11 @@ printTrackInfo(location, yards); } - List<String> sidings = location.getTrackIdsByNameList(Track.SIDING); - if (sidings.size() > 0) { - s = SPACE + Bundle.getMessage("SidingName") + NEW_LINE; + List<String> spurs = location.getTrackIdsByNameList(Track.SPUR); + if (spurs.size() > 0) { + s = SPACE + Bundle.getMessage("SpurName") + NEW_LINE; writer.write(s); - printTrackInfo(location, sidings); + printTrackInfo(location, spurs); } List<String> interchanges = location.getTrackIdsByNameList(Track.INTERCHANGE); @@ -334,7 +334,7 @@ writer.write(SPACE + MessageFormat.format(Bundle.getMessage("SpurTrackThatAccept"), new Object[] { type }) + NEW_LINE); - int trackLength = getTrackLengthAcceptType(locations, type, Track.SIDING); + int trackLength = getTrackLengthAcceptType(locations, type, Track.SPUR); if (trackLength > 0) writer.write(SPACE + MessageFormat.format(Bundle.getMessage("TotalLengthSpur"), new Object[] { type, @@ -608,7 +608,7 @@ private String getCarOrder(Track track) { // only yards and interchanges have the car order option - if (track.getLocType().equals(Track.SIDING) || track.getLocType().equals(Track.STAGING) + if (track.getLocType().equals(Track.SPUR) || track.getLocType().equals(Track.STAGING) || track.getServiceOrder().equals(Track.NORMAL)) return ""; if (track.getServiceOrder().equals(Track.FIFO)) @@ -719,7 +719,7 @@ private String getSchedule(Track track) { // only spurs have schedules - if (!track.getLocType().equals(Track.SIDING) || track.getSchedule() == null) + if (!track.getLocType().equals(Track.SPUR) || track.getSchedule() == null) return ""; StringBuffer buf = new StringBuffer(TAB + TAB Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/ScheduleManager.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/ScheduleManager.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/ScheduleManager.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -313,18 +313,18 @@ * @param schedule The schedule for this JComboBox. * @return JComboBox with a list of spurs using schedule. */ - public JComboBox getSidingsByScheduleComboBox(Schedule schedule){ + public JComboBox getSpursByScheduleComboBox(Schedule schedule){ JComboBox box = new JComboBox(); // search all spurs for that use schedule LocationManager manager = LocationManager.instance(); List<String> locations = manager.getLocationsByNameList(); for (int j=0; j<locations.size(); j++){ Location location = manager.getLocationById(locations.get(j)); - List<String> sidings = location.getTrackIdsByNameList(Track.SIDING); - for (int k=0; k<sidings.size(); k++){ - Track siding = location.getTrackById(sidings.get(k)); - if (siding.getScheduleId().equals(schedule.getId())){ - LocationTrackPair ltp = new LocationTrackPair(location, siding); + List<String> spurs = location.getTrackIdsByNameList(Track.SPUR); + for (int k=0; k<spurs.size(); k++){ + Track spur = location.getTrackById(spurs.get(k)); + if (spur.getScheduleId().equals(schedule.getId())){ + LocationTrackPair ltp = new LocationTrackPair(location, spur); box.addItem(ltp); } } Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesByLoadFrame.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesByLoadFrame.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesByLoadFrame.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -132,7 +132,7 @@ if (l.getLocationOps() == Location.NORMAL) { addItemLeft(locationsPanel, new JLabel(l.getName()), 0, x++); // now look for a spur with a schedule - List<String> spurs = l.getTrackIdsByNameList(Track.SIDING); + List<String> spurs = l.getTrackIdsByNameList(Track.SPUR); for (int j = 0; j < spurs.size(); j++) { Track spur = l.getTrackById(spurs.get(j)); Schedule sch = spur.getSchedule(); Modified: trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesTableModel.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesTableModel.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/SchedulesTableModel.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -32,8 +32,8 @@ private static final int IDCOLUMN = 0; private static final int NAMECOLUMN = IDCOLUMN+1; private static final int SCH_STATUSCOLUMN = NAMECOLUMN+1; - private static final int SIDINGSCOLUMN = SCH_STATUSCOLUMN+1; - private static final int STATUSCOLUMN = SIDINGSCOLUMN+1; + private static final int SPURCOLUMN = SCH_STATUSCOLUMN+1; + private static final int STATUSCOLUMN = SPURCOLUMN+1; private static final int EDITCOLUMN = STATUSCOLUMN+1; private static final int DELETECOLUMN = EDITCOLUMN+1; @@ -105,7 +105,7 @@ table.getColumnModel().getColumn(IDCOLUMN).setPreferredWidth(40); table.getColumnModel().getColumn(NAMECOLUMN).setPreferredWidth(200); table.getColumnModel().getColumn(SCH_STATUSCOLUMN).setPreferredWidth(80); - table.getColumnModel().getColumn(SIDINGSCOLUMN).setPreferredWidth(350); + table.getColumnModel().getColumn(SPURCOLUMN).setPreferredWidth(350); table.getColumnModel().getColumn(STATUSCOLUMN).setPreferredWidth(150); table.getColumnModel().getColumn(EDITCOLUMN).setPreferredWidth(70); table.getColumnModel().getColumn(DELETECOLUMN).setPreferredWidth(90); @@ -120,8 +120,8 @@ case IDCOLUMN: return Bundle.getMessage("Id"); case NAMECOLUMN: return Bundle.getMessage("Name"); case SCH_STATUSCOLUMN: return Bundle.getMessage("Status"); - case SIDINGSCOLUMN: return Bundle.getMessage("Sidings"); - case STATUSCOLUMN: return Bundle.getMessage("StatusSiding"); + case SPURCOLUMN: return Bundle.getMessage("Spurs"); + case STATUSCOLUMN: return Bundle.getMessage("StatusSpur"); case EDITCOLUMN: return Bundle.getMessage("Edit"); case DELETECOLUMN: return Bundle.getMessage("Delete"); default: return "unknown"; // NOI18N @@ -133,7 +133,7 @@ case IDCOLUMN: return String.class; case NAMECOLUMN: return String.class; case SCH_STATUSCOLUMN: return String.class; - case SIDINGSCOLUMN: return JComboBox.class; + case SPURCOLUMN: return JComboBox.class; case STATUSCOLUMN: return String.class; case EDITCOLUMN: return JButton.class; case DELETECOLUMN: return JButton.class; @@ -145,7 +145,7 @@ switch (col) { case EDITCOLUMN: case DELETECOLUMN: - case SIDINGSCOLUMN: + case SPURCOLUMN: return true; default: return false; @@ -171,15 +171,15 @@ case IDCOLUMN: return s.getId(); case NAMECOLUMN: return s.getName(); case SCH_STATUSCOLUMN: return getScheduleStatus(row); - case SIDINGSCOLUMN: { - JComboBox box = manager.getSidingsByScheduleComboBox(s); + case SPURCOLUMN: { + JComboBox box = manager.getSpursByScheduleComboBox(s); String index = comboSelect.get(sysList.get(row)); if (index != null){ box.setSelectedIndex(Integer.parseInt(index)); } return box; } - case STATUSCOLUMN: return getSidingStatus(row); + case STATUSCOLUMN: return getSpurStatus(row); case EDITCOLUMN: return Bundle.getMessage("Edit"); case DELETECOLUMN: return Bundle.getMessage("Delete"); default: return "unknown "+col; // NOI18N @@ -192,7 +192,7 @@ break; case DELETECOLUMN: deleteSchedule(row); break; - case SIDINGSCOLUMN: selectJComboBox(value, row); + case SPURCOLUMN: selectJComboBox(value, row); break; default: break; @@ -243,7 +243,7 @@ private LocationTrackPair getLocationTrackPair(int row){ Schedule s = manager.getScheduleById(sysList.get(row)); - JComboBox box = manager.getSidingsByScheduleComboBox(s); + JComboBox box = manager.getSpursByScheduleComboBox(s); String index = comboSelect.get(sysList.get(row)); LocationTrackPair ltp; if (index != null){ @@ -256,7 +256,7 @@ private String getScheduleStatus(int row){ Schedule sch = manager.getScheduleById(sysList.get(row)); - JComboBox box = manager.getSidingsByScheduleComboBox(sch); + JComboBox box = manager.getSpursByScheduleComboBox(sch); for (int i=0; i<box.getItemCount(); i++){ LocationTrackPair ltp = (LocationTrackPair)box.getItemAt(i); String status = ltp.getTrack().checkScheduleValid(); @@ -266,7 +266,7 @@ return Bundle.getMessage("Okay"); } - private String getSidingStatus(int row){ + private String getSpurStatus(int row){ LocationTrackPair ltp = getLocationTrackPair(row); if (ltp == null) return ""; Deleted: trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingEditFrame.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingEditFrame.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingEditFrame.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -1,158 +0,0 @@ -// SidingEditFrame.java - -package jmri.jmrit.operations.locations; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.awt.GridBagLayout; -import java.text.MessageFormat; - -import javax.swing.BorderFactory; -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JLabel; -import javax.swing.JPanel; - -import jmri.jmrit.operations.setup.Control; - -/** - * Frame for user edit of a spur. - * - * @author Dan Boudreau Copyright (C) 2008, 2011 - * @version $Revision$ - */ - -public class SidingEditFrame extends TrackEditFrame implements java.beans.PropertyChangeListener { - - // labels, buttons, etc. for spurs - JLabel textSchedule = new JLabel(Bundle.getMessage("DeliverySchedule")); - JLabel textSchError = new JLabel(); - JButton editScheduleButton = new JButton(Bundle.getMessage("Edit")); - JComboBox comboBoxSchedules = ScheduleManager.instance().getComboBox(); - - JPanel panelSchedule = panelOpt4; - - public SidingEditFrame() { - super(); - } - - public void initComponents(Location location, Track track) { - _type = Track.SIDING; - - // setup the optional panel with schedule stuff - panelSchedule.setLayout(new GridBagLayout()); - panelSchedule.setBorder(BorderFactory.createTitledBorder(Bundle - .getMessage("DeliverySchedule"))); - addItem(panelSchedule, comboBoxSchedules, 0, 0); - addItem(panelSchedule, editScheduleButton, 1, 0); - addItem(panelSchedule, textSchError, 2, 0); - - super.initComponents(location, track); - - _toolMenu.add(new AlternateTrackAction(this)); - _toolMenu.add(new ChangeTrackTypeAction(this)); - _toolMenu.add(new IgnoreUsedTrackAction(this)); - addHelpMenu("package.jmri.jmrit.operations.Operations_Sidings", true); // NOI18N - - // override text strings for tracks - panelTrainDir.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TrainSiding"))); - paneCheckBoxes.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TypesSiding"))); - deleteTrackButton.setText(Bundle.getMessage("DeleteSiding")); - addTrackButton.setText(Bundle.getMessage("AddSiding")); - saveTrackButton.setText(Bundle.getMessage("SaveSiding")); - - // Select the spur's Schedule - updateScheduleComboBox(); - - ScheduleManager.instance().addPropertyChangeListener(this); - - // setup buttons - addButtonAction(editScheduleButton); - // finish - panelOrder.setVisible(false); // Car order out of spurs is not available - pack(); - setVisible(true); - } - - public void buttonActionPerformed(java.awt.event.ActionEvent ae) { - if (ae.getSource() == editScheduleButton) { - editAddSchedule(); - } - super.buttonActionPerformed(ae); - } - - ScheduleEditFrame sef = null; - - private void editAddSchedule() { - log.debug("Edit/add schedule"); - if (sef != null) - sef.dispose(); - sef = new ScheduleEditFrame(); - Object selected = comboBoxSchedules.getSelectedItem(); - if (selected != null && !selected.equals("")) { - Schedule schedule = (Schedule) selected; - sef.setTitle(MessageFormat.format(Bundle.getMessage("TitleScheduleEdit"), - new Object[] { _track.getName() })); - sef.initComponents(schedule, _location, _track); - } else { - sef.setTitle(MessageFormat.format(Bundle.getMessage("TitleScheduleAdd"), - new Object[] { _track.getName() })); - sef.initComponents(null, _location, _track); - } - } - - protected void enableButtons(boolean enabled) { - editScheduleButton.setEnabled(enabled); - comboBoxSchedules.setEnabled(enabled); - if (!enabled) - comboBoxSchedules.setSelectedItem(""); - super.enableButtons(enabled); - } - - protected void saveTrack(Track track) { - // save the schedule - Object selected = comboBoxSchedules.getSelectedItem(); - if (selected == null || selected.equals("")) { - track.setScheduleId(""); - } else { - Schedule sch = (Schedule) selected; - // update only if the schedule has changed - track.setScheduleId(sch.getId()); - } - textSchError.setText(track.checkScheduleValid()); - super.saveTrack(track); - } - - protected void addNewTrack() { - super.addNewTrack(); - updateScheduleComboBox(); // reset schedule and error text - } - - private void updateScheduleComboBox() { - ScheduleManager.instance().updateComboBox(comboBoxSchedules); - if (_track != null) { - Schedule s = ScheduleManager.instance().getScheduleById(_track.getScheduleId()); - comboBoxSchedules.setSelectedItem(s); - textSchError.setText(_track.checkScheduleValid()); - } - } - - public void dispose() { - ScheduleManager.instance().removePropertyChangeListener(this); - super.dispose(); - } - - public void propertyChange(java.beans.PropertyChangeEvent e) { - if (Control.showProperty && log.isDebugEnabled()) - log.debug("Property change " + e.getPropertyName() + " old: " + e.getOldValue() - + " new: " + e.getNewValue()); // NOI18N - if (e.getPropertyName().equals(ScheduleManager.LISTLENGTH_CHANGED_PROPERTY) - || e.getPropertyName().equals(Track.SCHEDULE_CHANGED_PROPERTY)) { - updateScheduleComboBox(); - } - super.propertyChange(e); - } - - static Logger log = LoggerFactory.getLogger(SidingEditFrame.class - .getName()); -} Deleted: trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingTableModel.java =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingTableModel.java 2013-02-27 06:37:01 UTC (rev 22831) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingTableModel.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -1,69 +0,0 @@ -//SidingTableModel.java - -package jmri.jmrit.operations.locations; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.beans.*; -import javax.swing.*; -import jmri.jmrit.operations.setup.Control; - -/** - * Table Model for edit of spurs used by operations - * - * @author Daniel Boudreau Copyright (C) 2008 - * @version $Revision$ - */ -public class SidingTableModel extends TrackTableModel { - - public SidingTableModel() { - super(); - } - - public void initTable(JTable table, Location location) { - super.initTable(table, location, Track.SIDING); - } - - public String getColumnName(int col) { - switch (col) { - case NAMECOLUMN: - return Bundle.getMessage("SidingName"); - } - return super.getColumnName(col); - } - - protected void editTrack(int row) { - log.debug("Edit spur"); - if (tef != null) { - tef.dispose(); - } - tef = new SidingEditFrame(); - String sidingId = tracksList.get(row); - Track siding = _location.getTrackById(sidingId); - tef.initComponents(_location, siding); - tef.setTitle(Bundle.getMessage("EditSiding")); - focusEditFrame = true; - } - - // this table listens for changes to a location and it's spurs - public void propertyChange(PropertyChangeEvent e) { - if (Control.showProperty && log.isDebugEnabled()) - log.debug("Property change " + e.getPropertyName() + " old: " + e.getOldValue() - + " new: " + e.getNewValue()); // NOI18N - super.propertyChange(e); - if (e.getSource().getClass().equals(Track.class)) { - String type = ((Track) e.getSource()).getLocType(); - if (type.equals(Track.SIDING)) { - String sidingId = ((Track) e.getSource()).getId(); - int row = tracksList.indexOf(sidingId); - if (Control.showProperty && log.isDebugEnabled()) - log.debug("Update spur table row: " + row + " id: " + sidingId); - if (row >= 0) - fireTableRowsUpdated(row, row); - } - } - } - - static Logger log = LoggerFactory.getLogger(SidingTableModel.class - .getName()); -} Copied: trunk/jmri/java/src/jmri/jmrit/operations/locations/SpurEditFrame.java (from rev 22828, trunk/jmri/java/src/jmri/jmrit/operations/locations/SidingEditFrame.java) =================================================================== --- trunk/jmri/java/src/jmri/jmrit/operations/locations/SpurEditFrame.java (rev 0) +++ trunk/jmri/java/src/jmri/jmrit/operations/locations/SpurEditFrame.java 2013-02-27 18:39:13 UTC (rev 22832) @@ -0,0 +1,158 @@ +// SpurEditFrame.java + +package jmri.jmrit.operations.locations; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.awt.GridBagLayout; +import java.text.MessageFormat; + +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; + +import jmri.jmrit.operations.setup.Control; + +/** + * Frame for user edit of a spur. + * + * @author Dan Boudreau Copyright (C) 2008, 2011 + * @version $Revision$ + */ + +public class SpurEditFrame extends TrackEditFrame implements java.beans.PropertyChangeListener { + + // labels, buttons, etc. for spurs + JLabel textSchedule = new JLabel(Bundle.getMessage("DeliverySchedule")); + JLabel textSchError = new JLabel(); + JButton editScheduleButton = new JButton(Bundle.getMessage("Edit")); + JComboBox comboBoxSchedules = ScheduleManager.instance().getComboBox(); + + JPanel panelSchedule = panelOpt4; + + public SpurEditFrame() { + super(); + } + + public void initComponents(Location location, Track track) { + _type = Track.SPUR; + + // setup the optional panel with schedule stuff + panelSchedule.setLayout(new GridBagLayout()); + panelSchedule.setBorder(BorderFactory.createTitledBorder(Bundle + .getMessage("DeliverySchedule"))); + addItem(panelSchedule, comboBoxSchedules, 0, 0); + addItem(panelSchedule, editScheduleButton, 1, 0); + addItem(panelSchedule, textSchError, 2, 0); + + super.initComponents(location, track); + + _toolMenu.add(new AlternateTrackAction(this)); + _toolMenu.add(new ChangeTrackTypeAction(this)); + _toolMenu.add(new IgnoreUsedTrackAction(this)); + addHelpMenu("package.jmri.jmrit.operations.Operations_Sidings", true); // NOI18N + + // override text strings for tracks + panelTrainDir.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TrainSpur"))); + paneCheckBoxes.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TypesSpur"))); + deleteTrackButton.setText(Bundle.getMessage("DeleteSpur")); + addTrackButton.setText(Bundle.getMessage("AddSpur")); + saveTrackButton.setText(Bundle.getMessage("SaveSpur")); + + // Select the spur's Schedule + updateScheduleComboBox(); + + ScheduleManager.instance().addPropertyChangeListener(this); + + // setup buttons + addButtonAction(editScheduleButton); + // finish + panelOrder.setVisible(false); // Car order out of spurs is not available + pack(); + setVisible(true); + } + + public void buttonActionPerformed(java.awt.event.ActionEvent ae) { + if (ae.getSource() == editScheduleButton) { + editAddSchedule(); + } + super.buttonActionPerformed(ae); + } + + ScheduleEditFrame sef = null; + + private void editAddSchedule() { + log.debug("Edit/add schedule"); + if (sef != null) + sef.dispose(); + sef = new ScheduleEditFrame(); + Object selected = comboBoxSchedules.getSelectedItem(); + if (selected != null && !selected.equals("")) { + Schedule schedule = (Schedule) selected; + sef.setTitle(MessageFormat.format(Bundle.getMessage("TitleScheduleEdit"), + new Object[] { _track.getName() })); + sef.initComponents(schedule, _location, _track); + } else { + sef.setTitle(MessageFormat.format(Bundle.getMessage("TitleScheduleAdd"), + new Object[] { _track.getName() })); + sef.initComponents(null, _location, _track); + } + } + + protected void enableButtons(boolean enabled) { + editScheduleButton.setEnabled(enabled); + comboBoxSchedules.setEnabled(enabled); + if (!enabled) + comboBoxSchedules.setSelectedItem(""); + super.enableButtons(enabled); + } + + protected void saveTrack(Track track) { + // save the schedule + Object selected = comboBoxSchedules.getSelectedItem(); + if (selected == null || selected.equals("")) { + track.setScheduleId(""); + } else { + Schedule sch = (Schedule) selected; + // update only if the schedule has changed + track.setScheduleId(sch.getId()); + } + textSchError.setText(track.checkScheduleValid()); + super.saveTrack(track); + } + + protected void addNewTrack() { + super.addNewTrack(); + updateScheduleComboBox(); // reset schedule and error text + } + + private void updateScheduleComboBox() { + ScheduleManager.instance().updateComboBox(comboBoxSchedules); + if (_track != null) { + Schedule s = ScheduleManager.instance().getScheduleById(_track.getScheduleId()); + comboBoxSchedules.setSelectedItem(s); + textSchError.setText(_track.checkScheduleValid()); + } + } + + public void dispose() { + ScheduleManager.instance().removePropertyChangeListener(this); + super.dispose(); + } + + public void propertyChange(java.beans.PropertyChangeEvent e) { + if (Control.showProperty && log.isDebugEnabled()) +... [truncated message content] |