001package jmri.jmrit.operations.locations.tools;
002
003import java.awt.event.ActionEvent;
004
005import javax.swing.AbstractAction;
006
007import jmri.jmrit.operations.locations.gui.LocationEditFrame;
008
009/**
010 * Action to change all of tracks at a location to the same type of track. Track
011 * types are Spurs, Yards, Interchanges and Staging.
012 *
013 * @author Daniel Boudreau Copyright (C) 2011
014 * 
015 */
016public class ChangeTracksTypeAction extends AbstractAction {
017
018    private LocationEditFrame _lef;
019    private ChangeTracksFrame _ctf;
020
021    public ChangeTracksTypeAction(LocationEditFrame lef) {
022        super(Bundle.getMessage("MenuItemChangeTrackType"));
023        _lef = lef;
024    }
025
026    @Override
027    public void actionPerformed(ActionEvent e) {
028        if (_ctf != null) {
029            _ctf.dispose();
030        }
031        _ctf = new ChangeTracksFrame(_lef);
032    }
033
034}