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