001package jmri.jmrit.operations.locations; 002 003import javax.swing.BorderFactory; 004 005import jmri.jmrit.operations.locations.tools.ChangeTrackTypeAction; 006 007/** 008 * Frame for user edit of a yard 009 * 010 * @author Dan Boudreau Copyright (C) 2008 011 */ 012public class YardEditFrame extends TrackEditFrame { 013 014 public YardEditFrame() { 015 super(Bundle.getMessage("AddYard")); 016 } 017 018 @Override 019 public void initComponents(Track track) { 020 setTitle(Bundle.getMessage("EditYard", track.getLocation().getName())); 021 initComponents(track.getLocation(), track); 022 } 023 024 @Override 025 public void initComponents(Location location, Track track) { 026 _type = Track.YARD; 027 super.initComponents(location, track); 028 029 _toolMenu.insert(new ChangeTrackTypeAction(this), TOOL_MENU_OFFSET); 030 addHelpMenu("package.jmri.jmrit.operations.Operations_Yards", true); // NOI18N 031 032 // override text strings for tracks 033 panelTrainDir.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TrainYard"))); 034 paneCheckBoxes.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("TypesYard"))); 035 deleteTrackButton.setText(Bundle.getMessage("DeleteYard")); 036 addTrackButton.setText(Bundle.getMessage("AddYard")); 037 saveTrackButton.setText(Bundle.getMessage("SaveYard")); 038 // finish 039 dropPanel.setVisible(false); // don't show drop and pick up panel 040 pickupPanel.setVisible(false); 041 pack(); 042 setVisible(true); 043 } 044 045// private final static Logger log = LoggerFactory.getLogger(YardEditFrame.class); 046}